From f31a959ec540e25676120f2c245bf75672ba5eac Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 12 Feb 2025 10:45:42 +0100 Subject: [PATCH 1/6] build: add Gitea release workflow configuration --- .gitea/workflows/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..1e33a46 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release +on: + push: + +env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + +permissions: + contents: read # for checkout + +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 }} -- 2.47.2 From ab9598950a4cb975b1625e46044c5b8604902a62 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 12 Feb 2025 10:47:23 +0100 Subject: [PATCH 2/6] build: add release configuration for semantic release --- .gitea/workflows/release.yml | 2 +- release.config.cjs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 release.config.cjs diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1e33a46..7246d23 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -22,4 +22,4 @@ jobs: uses: https://git.kjan.de/actions/semantic-release@main with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} \ No newline at end of file diff --git a/release.config.cjs b/release.config.cjs new file mode 100644 index 0000000..e09738f --- /dev/null +++ b/release.config.cjs @@ -0,0 +1,15 @@ +module.exports = { + + branches: ['main'], + plugins: [ + '@semantic-release/commit-analyzer', + '@semantic-release/release-notes-generator', + '@semantic-release/changelog', + ["@saithodev/semantic-release-gitea", { + "giteaUrl": "https://git.simonis.lol" + }], + ], + }; + + + \ No newline at end of file -- 2.47.2 From 25ff804b76c09ebbab1e0b25c59770b06660dcb6 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 12 Feb 2025 10:49:45 +0100 Subject: [PATCH 3/6] ci: add master branch trigger for release workflow --- .gitea/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7246d23..1a4732d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,6 +1,8 @@ name: Release on: push: + branches: + - "master" env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} -- 2.47.2 From 774e55c6a6cc34eb55919e7456b5124d76123970 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 12 Feb 2025 10:50:51 +0100 Subject: [PATCH 4/6] ci: change runner to remote in release workflow --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1a4732d..9d7d6a2 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -13,7 +13,7 @@ permissions: jobs: release: name: Release - runs-on: ubuntu-latest + runs-on: remote permissions: contents: write # to be able to publish a GitHub release issues: write # to be able to comment on released issues -- 2.47.2 From f4541c5d865c8b778441b11ffb85b33041c0f1a3 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 12 Feb 2025 10:51:57 +0100 Subject: [PATCH 5/6] ci: update branch name in release workflow config --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9d7d6a2..d449485 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: push: branches: - - "master" + - "main" env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} -- 2.47.2 From 94ac9bd491268d8485243c984cdebd685365cfda Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 12 Feb 2025 10:52:49 +0100 Subject: [PATCH 6/6] style(release.yml): format permissions section in YAML --- .gitea/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index d449485..51e555c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -8,17 +8,17 @@ env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} permissions: - contents: read # for checkout + contents: read jobs: release: name: Release runs-on: remote 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 + contents: write + issues: write + pull-requests: write + id-token: write steps: - name: Create Release uses: https://git.kjan.de/actions/semantic-release@main -- 2.47.2