Build package and push #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build package and push | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
debug: | |
description: Sets "NODE_ENV" to "debug". | |
default: false | |
type: boolean | |
type: | |
description: Sets semantic version update type. | |
default: patch | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
container: node:lts | |
steps: | |
- uses: thaibault/build-package-push-action@main | |
id: build-package-and-push | |
with: | |
debug: ${{ inputs.debug || '' }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
npm-token: ${{ secrets.NPM_TOKEN }} | |
type: ${{ inputs.type || 'patch' }} | |
- name: Print determined version. | |
run: echo Newly determined version is \"${{ steps.build-package-and-push.outputs.version }}\". | |
shell: bash | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
event-type: prepare-release-event | |
client-payload: '{"version": "${{ steps.prepare-release.outputs.version }}"}' |