Skip to content

Commit

Permalink
chore(ci): add release workflow using semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
soonum committed Dec 13, 2024
1 parent 9154d0a commit a85c356
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Release new version of Slab action.
name: Release Slab action
on:
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0

- name: Do release
uses: codfish/semantic-release-action@b621d34fabe0940f031e89b6ebfea28322892a10
with:
branches: main
additional_packages: |
[
'@semantic-release/github',
'@semantic-release/git',
'@semantic-release/changelog',
]
env:
GITHUB_TOKEN: ${{ secrets.SLAB_ACTIONS_TOKEN }}
31 changes: 31 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"tagFormat": "v${version}",
"verifyConditions": ["@semantic-release/github"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Slab Action Changelog"
}
],
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "Cargo.toml"]
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "CHANGELOG.md"
}
]
}
]
]
}

0 comments on commit a85c356

Please sign in to comment.