-
-
Notifications
You must be signed in to change notification settings - Fork 50
100 lines (87 loc) · 2.91 KB
/
early-access.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: EarlyAccess
on:
push:
branches: [ master ]
jobs:
precheck:
name: Precheck
if: startsWith(github.event.head_commit.message, 'Releasing version') != true
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.vars.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Version
id: vars
shell: bash
run: |
echo ::set-output name=VERSION::$(cat VERSION)
build:
name: Build
needs: [precheck]
if: endsWith(${{ needs.precheck.outputs.VERSION }}, '-SNAPSHOT')
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ vars.JAVA_VERSION }}
distribution: ${{ vars.JAVA_DISTRO }}
cache: gradle
- name: Build
run: ./gradlew -Prelease=true build
- name: Assemble
run: ./gradlew -Prelease=true :ikonli-browser:jlinkZip :ikonli-browser:jpackage
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
if-no-files-found: ignore
retention-days: 1
path: |
apps/ikonli-browser/build/distributions/ikonli-browser-*x86_64.zip
apps/ikonli-browser/build/packagers/ikonli-browser-*.rpm
apps/ikonli-browser/build/packagers/ikonli-browser-*.dmg
apps/ikonli-browser/build/packagers/ikonli-browser-*.exe
apps/ikonli-browser/build/packagers/ikonli-browser-*.msi
apps/ikonli-browser/build/packagers/ikonli-browser-*.pkg
apps/ikonli-browser/build/packagers/ikonli-browser-*.deb
release:
name: Release
needs: [precheck, build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v3
- name: Release
uses: jreleaser/release-action@v2
with:
version: early-access
arguments: full-release -P artifactsDir=artifacts
env:
JRELEASER_PROJECT_VERSION: ${{ needs.precheck.outputs.VERSION }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
- name: JReleaser output
if: always()
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties