diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index f771c82..6490939 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -1,6 +1,8 @@ name: Release on: push: + branches: + - main env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} diff --git a/action.yml b/action.yml index 0a4b082..21230eb 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,10 @@ inputs: GITEA_TOKEN: description: "Gitea token" required: true + NPM_TOKEN: + description: "NPM Publish token" + required: false + default: "" runs: using: "composite" @@ -20,12 +24,16 @@ runs: with: node-version: "lts/*" - name: Install dependencies - run: npm install semantic-release @saithodev/semantic-release-gitea @semantic-release/changelog - - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies - run: npm audit signatures + run: npm install semantic-release @saithodev/semantic-release-gitea @semantic-release/changelog @semantic-release/release-notes-generator commitlint-plugin-cleanfeet conventional-changelog-conventionalcommits @semantic-release/git - name: Release env: GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} GITEA_TOKEN: ${{ inputs.GITEA_TOKEN }} - run: npx semantic-release + NPM_TOKEN: ${{ inputs.NPM_TOKEN }} + uses: cycjimmy/semantic-release-action@v4 + id: semantic +outputs: + new_release_published: + description: "The output from the action" + value: ${{ steps.semantic.outputs.new_release_published }}