Skip to content

Commit

Permalink
chore: Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Dec 14, 2024
1 parent ff2851d commit 1c73300
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 24 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

changelog:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.adoc
GITHUB_REPO: ${{ github.repository }}

- run: |
git diff
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add CHANGELOG.adoc
git commit -m "Update CHANGELOG" || exit 0
git push
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: release
on: workflow_dispatch

jobs:
tag_and_release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Calendar Version
id: calendar-version
uses: harm-matthias-harms/calendar-version@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.calendar-version.outputs.new-tag }}-alpha
skipIfReleaseExists: true
generateReleaseNotes: true

changelog:
needs: [tag_and_release]
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.adoc
GITHUB_REPO: ${{ github.repository }}

- run: |
git diff
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add CHANGELOG.adoc
git commit -m "Update CHANGELOG" || exit 0
git push

0 comments on commit 1c73300

Please sign in to comment.