Skip to content

Commit dfa97e4

Browse files
authored
ci(release): Add support for release via getsentry/publish repo (#3124)
Same as getsentry/symbolicator#319. #skip-changelog
1 parent 7710945 commit dfa97e4

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.craft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
minVersion: '0.13.2'
1+
minVersion: '0.14.0'
22
github:
33
owner: getsentry
44
repo: sentry-javascript

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: Version to release
7+
required: true
8+
force:
9+
description: Force a release even when there are release-blockers (optional)
10+
required: false
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
name: 'Release a new version'
15+
steps:
16+
- name: Prepare release
17+
uses: getsentry/action-prepare-release@main
18+
with:
19+
version: ${{ github.event.inputs.version }}
20+
force: ${{ github.event.inputs.force }}
21+
- uses: actions/checkout@v2
22+
with:
23+
token: ${{ secrets.GH_RELEASE_PAT }}
24+
fetch-depth: 0
25+
- uses: getsentry/craft@master
26+
name: Craft Prepare
27+
with:
28+
action: prepare
29+
version: ${{ env.RELEASE_VERSION }}
30+
- name: Request publish
31+
if: success()
32+
uses: actions/github-script@v3
33+
with:
34+
github-token: ${{ secrets.GH_RELEASE_PAT }}
35+
script: |
36+
const repoInfo = context.repo;
37+
await github.issues.create({
38+
owner: repoInfo.owner,
39+
repo: 'publish',
40+
title: `publish: ${repoInfo.repo}@${process.env.RELEASE_VERSION}`,
41+
});

0 commit comments

Comments
 (0)