diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9c600e7..73efac8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,5 +1,6 @@ name: Release -on: [workflow_dispatch] +on: + workflow_dispatch: permissions: contents: read # for checkout @@ -15,16 +16,5 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "lts/*" - - - name: Setup git - run: 'git config --global user.name "CI Bot" && git config --global user.email "ci@bjornp.com"' - - - name: Run commit and tag - run: npx commit-and-tag-version - - - name: Publishing release - run: git remote set-url origin https://bjorn:$GITEA_TOKEN@git.bjornp.com/bjorn/factorio-prometheus-exporter.git \&& git push --follow-tags origin main + - name: Determine release version and changelog + run: npx semantic-release diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..d55e8c5 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,10 @@ +{ + "branches": [ + "main", + "beta" + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator" + ] +} \ No newline at end of file diff --git a/.versionrc.json b/.versionrc.json deleted file mode 100644 index da88947..0000000 --- a/.versionrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "packageFiles": [ - { - "filename": "src/info.json", - "type": "json" - } - ] -} \ No newline at end of file