.github/workflows/publish.yml
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@v4
with:
ref: master
fetch-depth: 0
- uses: actions/setup-node@v4
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