Fix access issue to push new version #14
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Git Identity | |
run: | | |
git config --global user.name 'Mittwald Machine' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/mittwald/flow | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- run: yarn install --immutable | |
- uses: nrwl/nx-set-shas@v4 | |
- if: github.ref != 'refs/heads/main' | |
run: git branch --track main origin/main | |
- run: yarn nx affected -t build --parallel=3 | |
- name: "Version and publish" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
yarn lerna version --conventional-commits --conventional-prerelease=* --yes | |
yarn lerna publish from-git --yes --no-private |