Extend release workflow with tagging and releasing on GitHub (#477)

* Add github:release script

* Change release worflow
This commit is contained in:
Przemysław Łada 2023-05-17 15:00:51 +01:00 committed by GitHub
parent 2de2a40af1
commit 1995f507a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -9,7 +9,6 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
#
# TODO
# - Add tags for each app (e.g. search@3.0.1) for easier parsing
# - Print versions name to commit, for easier Vercel deployments
#
jobs:
@ -19,6 +18,9 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
# Tags are fetched for Changeset to distinguish from new ones while running `changeset tag`
- name: Git fetch tags
run: git fetch --tags origin
- name: Setup Node.js 16 # It was default for Changesets action, check if it can be bumped to v18
uses: actions/setup-node@v3
with:
@ -32,6 +34,8 @@ jobs:
with:
title: Release apps
commit: Release apps
publish: pnpm github:release
createGithubReleases: true
env:
# Use private access token so Github can trigger another workflow from this one
GITHUB_TOKEN: ${{ secrets.PAT }}

View file

@ -15,7 +15,8 @@
"test": "turbo run test",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"generate": "turbo run generate",
"prepare": "husky install"
"prepare": "husky install",
"github:release": "pnpm changeset tag && git push --follow-tags"
},
"devDependencies": {
"@changesets/cli": "^2.26.0",