forked from neo4j/graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.32 KB
/
changesets.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: changesets
on:
push:
branches:
- dev
- '*.*.*'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
environment:
name: npm
outputs:
published: ${{ steps.changesets.outputs.published }}
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: lts/*
- name: Install Dependencies
run: yarn
- name: Configure git
run: |
git config --global user.name 'Neo4j Team GraphQL'
git config --global user.email 'team-graphql@neotechnology.com'
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
@neo4j:registry https://registry.npmjs.org
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create release PR or release
id: changesets
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
with:
title: changesets for branch `${{ github.ref_name }}`
version: yarn changeset-version-${{ github.ref_name }}
publish: yarn release
setupGitUser: false
env:
GITHUB_TOKEN: ${{ secrets.NEO4J_TEAM_GRAPHQL_PERSONAL_ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
slack-notify:
needs:
- release
if: ${{ needs.release.outputs.published == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.release.outputs.published-packages) }}
steps:
- name: Send Slack announcement of release
if: matrix.package.name == '@neo4j/graphql'
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
with:
payload: '{"version":"${{ matrix.package.version }}"}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_ANNOUNCEMENT_WEBHOOK_URL }}