Merge pull request #552 from scala-steward-org/feature/update-node #66
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
# Releases a new minor version every time a PR is merged into `master`. | |
# | |
# It also generates the `dist` folder inside the tag's commit, keeping | |
# the `master` branch clean. | |
# | |
# It will also update the major tag v2 to track the latest tag. | |
name: Release new version | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
new-release: | |
name: Create new release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
ref: master | |
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | |
with: | |
node-version: '20' | |
- name: Run `npm install` | |
run: npm install | |
- name: Run `npm run build` | |
run: npm run build | |
- name: Release new version | |
uses: int128/release-typescript-action@94c45715849473c37ebdc66190c9ec4c9543e46b # v1.27.0 | |
with: | |
major-version: 2 | |
update-docs: | |
name: Update documentation | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
ref: master | |
- name: Run `npm install` | |
run: npm install | |
- name: Run `npm run docs` | |
run: npm run docs | |
- name: Commit changes by `npm run docs` | |
uses: alejandrohdezma/actions/commit-and-push@v1 | |
with: | |
message: Run `npm run docs` [skip ci] | |
branch: master |