Skip to content

Commit

Permalink
ci: update actions (#77)
Browse files Browse the repository at this point in the history
* ci: update actions

* ci: no separate tags job
  • Loading branch information
tpluscode authored Feb 7, 2024
1 parent b55f20d commit 2a405da
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,31 @@ on:
branches:
- master

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_PRIVATE_KEY }}

- name: Checkout Repo
uses: actions/checkout@master
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- name: Setup Node.js
uses: actions/setup-node@master
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Dependencies
run: npm ci
Expand All @@ -27,26 +39,6 @@ jobs:
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

tags:
name: Create tags
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_PRIVATE_KEY }}

- name: Tag Release
uses: tpluscode/action-autotag@min-version-21
with:
tag_prefix: v
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 2a405da

Please sign in to comment.