Skip to content

Commit

Permalink
ci: add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgomesdev committed Dec 21, 2023
1 parent d9ef9a2 commit 322974b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
push:
branches: ["main"]
branches: ["main", "cicd/add-semantic-release"]

jobs:
build-server:
Expand Down Expand Up @@ -83,28 +83,23 @@ 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/[email protected]
with:
artifacts: "server-*,app.apk"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
removeArtifacts: true
artifactErrorsFailBuild: true
prerelease: true
name: Latest Pre-release
tag: latest
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": [
{ "path": "server-*", "label": "Server binary" },
{ "path": "app.apk", "label": "App" }
]
}
]
]
}

0 comments on commit 322974b

Please sign in to comment.