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