diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e20f4bf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: release + +on: + workflow_dispatch: + inputs: + semver: + description: The semver to use + required: true + default: patch + type: choice + options: + - patch + - minor + - major + pull_request: + types: [closed] + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: nearform/optic-release-automation-action@v2 + with: + github-token: ${{ secrets.github_token }} + npm-token: ${{ secrets[format('NPM_TOKEN_{0}', github.actor)] || secrets.NPM_TOKEN }} + optic-token: ${{ secrets[format('OPTIC_TOKEN_{0}', github.actor)] || secrets.OPTIC_TOKEN }} + semver: ${{ github.event.inputs.semver }} + commit-message: 'chore: release {version}' \ No newline at end of file