Files
simple-keyboard/.github/workflows/publish.yml
T
Francisco Hodge e710bd3026 Refactor GitHub Actions publish workflow
Simplified the publish workflow by removing the matrix strategy and updating Node.js version to 24.
2026-02-03 22:36:41 -05:00

54 lines
1.3 KiB
YAML

name: Publish
on:
push:
branches:
- master
paths-ignore:
- README.md
- .gitignore
- .github/**
permissions:
contents: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: npm install, build, and test
run: |
export NODE_OPTIONS=--openssl-legacy-provider
npm install
npm run test -- --coverage --watchAll=false
- name: Setup GIT
run: |
git reset --hard
git config --local --list
git checkout master
git config user.email "$GH_EMAIL"
git config user.name "Francisco Hodge"
env:
GH_EMAIL: ${{secrets.GH_EMAIL}}
- name: Bump version
run: |
export NODE_OPTIONS=--openssl-legacy-provider
git reset --hard
npm version patch
npm run build
git add . || true
git commit -m "Build update" || true
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: npm publish