-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.43 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
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: Create release
on:
push:
# Pattern matched against refs/tags
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
issues: write
contents: write
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
HUSKY: 0
jobs:
release:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Deps
uses: ./.github/actions/install-deps
with:
cypress: false
apt-packages: true
run-scripts: true
- name: create sentry release version
id: sentry-version
run: |
SENTRY_VERSION="angular-examples@${{ github.ref_name }}"
echo "Sentry version: ${SENTRY_VERSION}"
echo "sentry-version=${SENTRY_VERSION}" >> $GITHUB_ENV
- name: Build
run: npx nx run-many -t="build" -c production --projects="tag:app"
- name: ZIP-files for release
uses: vimtor/action-zip@v1
with:
files: |
dist/
dest: release.zip
- uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.RELEASE_GH_TOKEN }}'
prerelease: false
files: release.zip
- name: Create Sentry Release
uses: getsentry/action-release@v1
with:
version: ${{ env.sentry-version }}
sourcemaps: 'dist/production dist/production/bacteria-game-remote dist/production/fib-wasm dist/production/fourier-analysis-remote'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: 'wolsok'
SENTRY_PROJECT: 'angular-examples'
- name: Create Issue on Failure
if: failure()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueTitle = 'bug(release): create release pipeline failed';
const issueBody = 'GitHub [create release workflow](https://github.com/WolfSoko/wol-sok-mono/actions/workflows/release.yml) failed';
const labels = ['bug'];
const assignees = [context.actor];
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: issueTitle,
body: issueBody,
assignees: assignees,
labels: labels
});