-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2.18 KB
/
release.yml
File metadata and controls
69 lines (60 loc) · 2.18 KB
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
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.SCOPE3_WIZARD_CLIENT_ID }}
private-key: ${{ secrets.SCOPE3_WIZARD_APP_PRIVATE_KEY }}
- name: Configure git for app token
run: |
git remote set-url origin "https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}"
git config user.name "scope3-wizard[bot]"
git config user.email "${{ vars.SCOPE3_WIZARD_APP_ID }}+scope3-wizard[bot]@users.noreply.github.com"
# setup-node used directly: internal action doesn't support registry-url
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
version: npm run version
commit: 'chore: version packages'
title: 'chore: version packages'
setupGitUser: false
github-token: ${{ steps.app-token.outputs.token }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Notify on failure
if: failure()
uses: ./.github/actions/slack-post
env:
SLACK_TOKEN: ${{ secrets.SLACK_NOTIF_BOT_TOKEN }}
with:
channel: '#agentic-service-alerts'
header: 'Release Failed'
content: '[{"type": "section", "text": {"type": "mrkdwn", "text": "The release workflow failed. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run>"}}]'