Include link when there are no changes (#337) #260
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: covector version or publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
covector: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: volta-cli/action@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
- name: git config | |
run: | | |
git config --global user.name "${{ github.event.pusher.name }}" | |
git config --global user.email "${{ github.event.pusher.email }}" | |
- run: npm ci --ignore-scripts | |
- run: npm run build | |
- run: npm run pkg -w action | |
- name: covector version-or-publish | |
uses: ./packages/action | |
id: covector | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
command: "version-or-publish" | |
createRelease: true | |
recognizeContributors: true | |
- name: dump covector output | |
env: | |
COVECTOR_CONTEXT: ${{ toJson(steps.covector) }} | |
run: echo "$COVECTOR_CONTEXT" | |
- name: sync lockfile | |
if: steps.covector.outputs.commandRan == 'version' | |
run: npm install | |
- name: create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
if: steps.covector.outputs.commandRan == 'version' | |
with: | |
title: "Publish New Versions" | |
commit-message: "publish new versions" | |
labels: "version updates, preview" | |
branch: "release" | |
body: ${{ steps.covector.outputs.change }} |