Publish and release (latest) #71
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: Publish and release (latest) | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: | |
- release-triggered | |
env: | |
GIT_COMMIT: ${{ github.sha }} | |
GIT_REF: ${{ github.ref }} | |
LOG_LEVEL: info | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
outputs: | |
version: v${{ steps.publish.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- id: publish | |
run: scripts/ci/release.sh | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: v${{ steps.publish.outputs.version }} | |
release_name: Release v${{ steps.publish.outputs.version }} | |
body: ${{steps.publish.outputs.notes}} | |
draft: false | |
prerelease: false |