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 af0acb9
Show file tree
Hide file tree
Showing 2 changed files with 28 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 }}
18 changes: 18 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"release": {
"branches": ["master", "next"]
},
"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 af0acb9

Please sign in to comment.