From 8df1ec7ee1d9c081c76ff87fd0236e1c1ec83656 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 25 Sep 2024 11:59:53 +0000 Subject: [PATCH] feat: add release workflow for Gitea integration (!13) Reviewed-on: https://git.kjan.de/jank/LF8/pulls/13 Reviewed-by: Phan Huy Tran Co-authored-by: Jan Klattenhoff Co-committed-by: Jan Klattenhoff --- .gitea/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ release.config.cjs | 12 ++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .gitea/workflows/release.yml create mode 100644 release.config.cjs diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..1c29ae9 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release +on: + push: + branches: + - main + +env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + +permissions: + contents: read # for checkout + +concurrency: + group: ${{ github.ref }} # Ensure each branch has its own group + cancel-in-progress: false # Prevent new runs from canceling in-progress runs + +jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance + steps: + - name: Create Release + uses: https://git.kjan.de/actions/semantic-release@main + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} diff --git a/release.config.cjs b/release.config.cjs new file mode 100644 index 0000000..375ccd5 --- /dev/null +++ b/release.config.cjs @@ -0,0 +1,12 @@ +module.exports = { + + branches: ['main'], + plugins: [ + '@semantic-release/commit-analyzer', + '@semantic-release/release-notes-generator', + '@semantic-release/changelog', + ["@saithodev/semantic-release-gitea", { + "giteaUrl": "https://git.kjan.de" + }], + ], +};