diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml new file mode 100644 index 0000000..021bc14 --- /dev/null +++ b/.github/workflows/_release.yml @@ -0,0 +1,31 @@ +name: _ Run Release +on: + workflow_call: + inputs: + debug: + type: boolean + default: false + dry-run: + type: boolean + default: false + secrets: + NPM_TOKEN: + required: true + +jobs: + release: + name: Run release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'npm' + - run: npm ci --ignore-scripts ${{ inputs.dry-run }} + - env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release --debug ${{ inputs.debug }} --dry-run ${{ inputs.dry-run }} \ No newline at end of file diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml new file mode 100644 index 0000000..10b94ec --- /dev/null +++ b/.github/workflows/manual-release.yml @@ -0,0 +1,21 @@ +name: '[Manual] Release' +on: + workflow_dispatch: + inputs: + debug: + description: 'Debug' + type: boolean + default: true + dry-run: + description: 'Dry run' + type: boolean + default: true + +jobs: + release: + name: Release + uses: ./.github/workflows/_release.yml + with: + debug: ${{ inputs.debug }} + dry-run: ${{ inputs.dry-run }} + secrets: inherit \ No newline at end of file