-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (43 loc) · 1.59 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
name: Release
on:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.0'
- name: Install dependencies
run: yarn install
- name: "Version"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "Anas Mazouni (via GitHub Actions)"
git config user.email "[email protected]"
git remote set-url origin "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git"
git reset --hard
yarn release
yarn genversion
VERSION=$(sed 's/.*"version": "\(.*\)".*/\1/;t;d' ./package.json)
git add .
git commit -m "chore(release): new version $VERSION [skip ci]"
git tag -a "v$VERSION" -m "chore(release): new version $VERSION [skip ci]"
git push --follow-tags
- name: Create release on sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: stormix
SENTRY_PROJECT: whatshouldibuildnext
SKIP_ENV_VALIDATION: true
run: |
curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="2.2.0" bash
yarn build
VERSION=$(sed 's/.*"version": "\(.*\)".*/\1/;t;d' ./package.json)
sentry-cli releases new "$VERSION"
sentry-cli releases set-commits "$VERSION" --auto
sentry-cli releases files "$VERSION" upload-sourcemaps ./dist --rewrite
sentry-cli releases finalize "$VERSION"