-
Notifications
You must be signed in to change notification settings - Fork 212
52 lines (48 loc) · 1.6 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release
on:
push:
branches:
- main
permissions: write-all
env:
RELEASE_COMMIT_MSG: 'chore(release): update monorepo packages versions'
jobs:
stable:
name: Stable
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup environment
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
packageManagerVersion: 9.1.0
- name: Set variables
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "date=$(date +"%B %d, %Y")" >> $GITHUB_OUTPUT
- name: Build
if: ${{ startsWith(github.event.head_commit.message, env.RELEASE_COMMIT_MSG) }}
run: pnpm --filter=@graphprotocol/graph-cli build
- name: Pack binaries
if: ${{ startsWith(github.event.head_commit.message, env.RELEASE_COMMIT_MSG) }}
run: pnpm --filter=@graphprotocol/graph-cli oclif:pack
- name: Release / pull_request
uses: dotansimha/[email protected]
with:
publish: pnpm release
version: pnpm changeset version
commit: ${{ env.RELEASE_COMMIT_MSG }}
title: Upcoming Release Changes
createGithubReleases: true
githubReleaseName: ${{ steps.vars.outputs.date }}
githubReleaseAssets: packages/cli/dist/*.tar.gz
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}