2ff8458b00
GitHub began the Node16 deprecation process a year ago [1][2]. This commit updates CI workflows to use the latest Node20 actions. [1]: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/ [2]: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Prepare Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- '**'
|
|
|
|
env:
|
|
CI: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: write # for softprops/action-gh-release to create GitHub release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: git fetch --tags -f
|
|
|
|
- name: Resolve version
|
|
id: vars
|
|
run: |
|
|
echo "TAG_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
|
|
|
|
- name: Get release notes
|
|
run: |
|
|
RELEASE_NOTES=$(npm run release-notes $TAG_NAME --silent)
|
|
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
|
|
echo "$RELEASE_NOTES" >> $GITHUB_ENV
|
|
echo "EOF" >> $GITHUB_ENV
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
draft: true
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
body: |
|
|
${{ env.RELEASE_NOTES }}
|