Skip to content

change labels (#155) #465

change labels (#155)

change labels (#155) #465

Workflow file for this run

name: nodejs
on:
push:
branches:
- main
tags:
- "*"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
node-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable yarn
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "22"
- run: yarn install --immutable
- run: yarn lint
bump-version-and-release:
needs: node-lint
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.ETHUI_DEPLOYER_APP_ID }}
private-key: ${{ secrets.ETHUI_DEPLOYER_PKEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
- run: npm install -g yarn
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
scope: '@ethui'
- run: yarn install --immutable
- run: yarn version patch
- run: yarn build
- id: version
run: echo "version=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
- name: Push version changes to main branch 📤
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: ethui-deployer
commit_user_email: dev@ethui.dev
commit_author: ethui-deployer <dev@ethui.dev>
commit_message: "release ${{ steps.version.outputs.version }}\n[skip ci]"
branch: ${{ github.event.repository.default_branch }}
file_pattern: package.json
- run: cp ../yarn.lock . && yarn
working-directory: ./dist
- run: yarn npm publish --access public
working-directory: ./dist
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}