v16.0.2 #62
Workflow file for this run
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: Release | |
on: | |
release: | |
types: | |
- published | |
env: | |
FORCE_COLOR: 2 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
strategy: | |
matrix: | |
node: | |
- latest | |
steps: | |
- name: Get version from tag | |
id: tag_name | |
run: echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
registry-url: "https://registry.npmjs.org" | |
- name: Get changelog entry | |
uses: mindsers/[email protected] | |
id: changelog_reader | |
with: | |
version: ${{ steps.tag_name.outputs.current_version }} | |
- name: Update release with changelog contents | |
uses: softprops/[email protected] | |
id: release_updater | |
with: | |
body: ${{ steps.changelog_reader.outputs.changes }} | |
- name: Create discussion for release | |
run: | | |
gh api \ | |
--method PATCH \ | |
-H "Accept: application/vnd.github+json" \ | |
/repos/${{ github.repository }}/releases/${{ steps.release_updater.outputs.id }} \ | |
-f discussion_category_name='Announcements' | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
- run: npm ci | |
- run: npm whoami && npm --ignore-scripts publish --access public --provenance | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |