Merge pull request #299 from thefrontside/cl/simplify-release-tags #13
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: Version Or Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
version-or-publish: | |
runs-on: ubuntu-latest | |
timeout-minutes: 65 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.FRONTSIDEJACK_GITHUB_TOKEN }} | |
fetch-depth: 0 # required for use of git history | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
- name: Commit Signing | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.FRONTSIDEJACK_GPG_KEY }} | |
passphrase: ${{ secrets.FRONTSIDEJACK_GPG_KEY_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: covector version or publish (publish when no change files present) | |
uses: jbolda/covector/packages/action@covector-v0.12 | |
id: covector | |
with: | |
token: ${{ secrets.FRONTSIDEJACK_GITHUB_TOKEN }} | |
command: "version-or-publish" | |
recognizeContributors: true | |
- name: Create Pull Request With Versions Bumped | |
uses: peter-evans/create-pull-request@v6 | |
if: steps.covector.outputs.commandRan == 'version' | |
with: | |
token: ${{ secrets.FRONTSIDEJACK_GITHUB_TOKEN }} | |
title: "Publish New Versions" | |
author: Jack <jack@frontside.com> | |
committer: Jack <jack@frontside.com> | |
commit-message: "publish new versions" | |
labels: "version updates" | |
branch: "release" | |
body: ${{ steps.covector.outputs.change }} | |
- name: Push Git Tags | |
# through the actions/checkout token, this will use the frontsidejack token | |
if: steps.covector.outputs.commandRan == 'publish' | |
run: git push --tags |