Skip to content

use skip-ci tags for publish.yml #33

use skip-ci tags for publish.yml

use skip-ci tags for publish.yml #33

Workflow file for this run

name: Node.js Package
on:
push:
branches: [main]
paths-ignore:
- '**/botaction'
release:
types: [created]
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: test -f /usr/bin/jq || sudo apt install -y --no-install-recommends jq
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "21.x"
- run: corepack enable && yarn install
- run: yarn build
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "21.x"
registry-url: https://npm.pkg.github.com/
scope: "@MoreChickenDelivered"
- run: corepack enable
- name: Configure SSH/Git permissions
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK >/dev/null 2>&1
ssh-add - <<< "${{ secrets.DEPLKEY_PRIV }}"
- run: git config --global user.email "[email protected]" && git config --global user.name "$GITHUB_ACTOR"
- run: yarn version patch
- run: echo "NEW_TAG=$(jq .version <package.json)" >> "$GITHUB_ENV"
- run: git tag v$NEW_TAG
- run: git add package.json && git commit -m "[skip ci] [auto-semver-tag] auto tag v$NEW_TAG"
- run: git remote set-url origin [email protected]:/MoreChickenDelivered/md-loader
- run: git push --tags && git push
- name: Setup .yarnrc.yml
run: |
yarn config set npmScopes.my-org.npmRegistryServer "https://npm.pkg.github.com"
yarn config set npmScopes.my-org.npmAlwaysAuth true
yarn config set npmScopes.my-org.npmAuthToken $NODE_AUTH_TOKEN
- run: yarn npm publish