Feature/more components (#92) #144
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: Publish (Release) | |
on: | |
push: | |
branches: | |
- main | |
- next | |
jobs: | |
publish-release: | |
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: 8BitJonny/[email protected] | |
id: PR | |
with: | |
filterOutClosed: true | |
sha: ${{ github.event.pull_request.head.sha }} | |
- name: Change Node.js Version | |
uses: actions/[email protected] | |
with: | |
node-version: 18.16.0 | |
- name: Cache node_modules | |
uses: actions/[email protected] | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- run: npm ci | |
- name: Tests | |
run: npm run test | |
- name: Check build | |
run: npm run build | |
- run: | | |
git fetch --tags --unshallow | |
npm run release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
PR: ${{ steps.PR.outputs.number }} |