-
Notifications
You must be signed in to change notification settings - Fork 525
79 lines (67 loc) · 2.49 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
name: Release
on:
workflow_dispatch:
inputs:
pre_release:
type: boolean
description: "Pre-release"
default: true
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
token: ${{ secrets.LICHTBLICK_GITHUB_TOKEN }}
lfs: true
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: 16.17
- name: Enable corepack
run: corepack enable yarn
- name: Bump minor version and save it on environment variable
run: |
yarn version minor
NEW_VERSION=$(node -p "require('./package.json').version")
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
- name: Bump @lichtblick/suite version
run: yarn version minor
working-directory: packages/suite
- name: Install dependencies
run: yarn install --immutable
- name: Build prod files
run: |
yarn run desktop:build:prod
- name: Build release binaries for multiple OS
run: |
yarn run package:win
yarn run package:linux
yarn run package:darwin
# Important to use [skip actions] to avoid triggering other verisoning workflows
# https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/skipping-workflow-runs
- name: Commit and tag the new version
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add package.json packages/suite/package.json yarn.lock
git commit -m "Bump version v${{ env.new_version }} [skip actions]"
git tag "v${{ env.new_version }}"
git push origin main --tags
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: "v${{ env.new_version }}"
name: "v${{ env.new_version }}"
commit: main
generateReleaseNotes: true
prerelease: ${{ github.event.inputs.pre_release }}
token: ${{ secrets.LICHTBLICK_GITHUB_TOKEN }}
artifacts: |
dist/lichtblick-${{ env.new_version }}-linux-amd64.deb
dist/lichtblick-${{ env.new_version }}-mac-universal.dmg
dist/lichtblick-${{ env.new_version }}-win.exe
dist/latest-linux.yml
dist/latest-mac.yml
dist/latest.yml