diff --git a/.github/workflows/make-release-artifacts.yml b/.github/workflows/make-release-artifacts.yml index f99993f..5040838 100644 --- a/.github/workflows/make-release-artifacts.yml +++ b/.github/workflows/make-release-artifacts.yml @@ -6,15 +6,27 @@ on: - reopened - opened - synchronize + workflow_dispatch: + inputs: + tag: + type: string + description: 'The release tag that should be referenced (i.e. `v1.2.3`)' + required: true + force: + type: boolean + description: 'Force the release artifacts to be created and uploaded' + required: false + default: false jobs: run: - if: startsWith( github.head_ref, 'release/') + if: github.event_name == 'workflow_dispatch' || startsWith( github.head_ref, 'release/') uses: rokucommunity/workflows/.github/workflows/make-release-artifacts.yml@master with: - branch: ${{ github.event.pull_request.head.ref }} + branch: ${{ github.event.inputs.tag || github.event.pull_request.head.ref }} node-version: "15.0.1" artifact-paths: "./*.tgz" # "*.vsix" + force: ${{ github.event.inputs.force == 'true' }} secrets: inherit success-or-skip: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 32c11ad..48f6fba 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -3,16 +3,23 @@ name: Publish Release on: pull_request: types: - - closed + - closed paths: - - 'package.json' - - 'package-lock.json' + - "package.json" + - "package-lock.json" + workflow_dispatch: + inputs: + tag: + type: string + description: "The release tag that should be published (i.e. `v1.2.3`)" + required: true jobs: run: - if: startsWith( github.head_ref, 'release/') + if: github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release/') uses: rokucommunity/workflows/.github/workflows/publish-release.yml@master with: - release-type: "npm" # "vsce" - ref: ${{ github.event.pull_request.merge_commit_sha }} + release-type: "npm" # or "vsce" + ref: ${{ github.event.inputs.tag || github.event.pull_request.merge_commit_sha }} secrets: inherit +