From 5545dd4efaca97ad5a30282f277c4b379db548c3 Mon Sep 17 00:00:00 2001 From: David Gomes <10091092+davidgomesdev@users.noreply.github.com> Date: Thu, 21 Dec 2023 17:48:41 +0000 Subject: [PATCH] feat: add semantic release --- .github/workflows/release.yml | 26 +++++++++++++------------- .releaserc | 15 +++++++++++++++ 2 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 .releaserc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7374b2d..229d2f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,28 +83,28 @@ jobs: name: app.apk path: app.apk - upload: + release: needs: [build-server, build-app] runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - name: 📦 - Copy server artifacts uses: actions/download-artifact@v4 with: - path: . + path: artifacts/ merge-multiple: true - name: 🧐 - Display structure of downloaded artifacts - run: ls -R + run: ls -R artifacts/ - - name: 🌠 - Release - uses: ncipollo/release-action@v1.12.0 + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v4 with: - artifacts: "server-*,app.apk" - token: ${{ secrets.GITHUB_TOKEN }} - allowUpdates: true - removeArtifacts: true - artifactErrorsFailBuild: true - prerelease: true - name: Latest Pre-release - tag: latest + branches: | + [ + 'main', + ] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..1987fc2 --- /dev/null +++ b/.releaserc @@ -0,0 +1,15 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/github", + { + "assets": [ + { "path": "artifacts/server-*" }, + { "path": "artifacts/app.apk" } + ] + } + ] + ] +} \ No newline at end of file