Skip to content

Commit

Permalink
Merge pull request #1187 from brendandburns/release
Browse files Browse the repository at this point in the history
Add pre-release option to gh action workflow.
  • Loading branch information
k8s-ci-robot committed Aug 3, 2023
2 parents 38cd517 + 8806b10 commit b708324
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
required: true
default: false
description: Dry run, will not push branches or upload the artifacts.
pre_release:
type: boolean
required: true
default: false
description: If true, push pre-release tag.
skip_tag:
type: boolean
required: true
Expand All @@ -35,10 +40,15 @@ jobs:
- name: Package
run: ./build-package.sh
- name: Upload
if: ${{ github.event.inputs.dry_run != 'true' }}
if: ${{ github.event.inputs.dry_run != 'true' && github.event.inputs.pre_release != 'true' }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Upload pre-release
if: ${{ github.event.inputs.dry_run != 'true' && github.event.inputs.pre_release == 'true' }}
run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Tag release
if: ${{ github.event.inputs.skip_tag != 'true' }}
run: |
Expand Down

0 comments on commit b708324

Please sign in to comment.