From 6d2be83fdc6e6533afba20e1b6ffcf9e7c87b3ba Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Fri, 18 Oct 2024 22:04:18 -0500 Subject: [PATCH 1/3] chore: Include releaserc file --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ .releaserc | 18 +++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .releaserc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3f33363 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release +on: + push: + branches: + - main +jobs: + release: + name: "Release" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # Workaround for issue: https://github.com/cycjimmy/semantic-release-action/issues/159 + # Had to pin to version 14 + - name: "Pin node version" + uses: actions/setup-node@v2 + with: + node-version: '14' + # Use haskell environment to run cabal configure needed for semantic-release-hackage + - name: Setup Haskell + id: setup-haskell-cabal + uses: haskell-actions/setup@v2 + with: + ghc-version: "9.0" + cabal-version: "3.8" + - name: Semantic Release + run: cabal configure --enable-tests + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v4 + with: + extra_plugins: | + @semantic-release/commit-analyzer + @semantic-release/release-notes-generator + @semantic-release/github + semantic-release-hackage@1.1.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HACKAGE_TOKEN: ${{ secrets.HACKAGE_TOKEN }} diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..2fbd2c2 --- /dev/null +++ b/.releaserc @@ -0,0 +1,18 @@ +{ + "$schema": "https://json.schemastore.org/semantic-release", + "branches": ["main", "chore-semantic-release"], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "semantic-release-hackage", + { + "packageName": "dotenv", + "versionPrefix": "0.", + "publishDocumentation": true + } + ], + "@semantic-release/github" + ], + "tagFormat": "v0.${version}" +} From 5f1b119987d25826e12246e1f9d7520f6b9e74eb Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Fri, 18 Oct 2024 22:08:41 -0500 Subject: [PATCH 2/3] chore(ci): Remove version from cabal file --- dotenv.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotenv.cabal b/dotenv.cabal index 1232a7e..d07697a 100644 --- a/dotenv.cabal +++ b/dotenv.cabal @@ -1,5 +1,5 @@ name: dotenv -version: 0.12.0.0 +version: 0.0.0.0 synopsis: Loads environment variables from dotenv files homepage: https://github.com/stackbuilders/dotenv-hs description: From b898f3afd39936260823ce1d7b76c5ead8a20894 Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Fri, 18 Oct 2024 22:15:14 -0500 Subject: [PATCH 3/3] fix(ci): Remove unused branch from releaserc file --- .releaserc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.releaserc b/.releaserc index 2fbd2c2..b5bfc69 100644 --- a/.releaserc +++ b/.releaserc @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/semantic-release", - "branches": ["main", "chore-semantic-release"], + "branches": ["main"], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator",