-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 1.54 KB
/
snapshot.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
name: Release (snapshot)
on: [ push ]
jobs:
quality-assurance:
permissions:
actions: read
contents: read
security-events: write
packages: read
name: Quality Assurance
uses: ./.github/workflows/qa.yml
versioning:
name: Versioning
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- id: version
env:
GIT_SHA: ${{ github.sha }}
run: |
echo "version=${GIT_SHA:0:16}-SNAPSHOT" >> $GITHUB_OUTPUT
release:
name: Release (Snapshot)
runs-on: ubuntu-latest
needs: [ quality-assurance, versioning ]
permissions:
packages: write
steps:
- uses: actions/checkout@v3
# region todo(James Bradlee): Find an effective way to do this in a different job and
# download the cache and artifacts for immediate release when
# quality assurance is complete.
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Build
env:
VERSION: ${{ needs.versioning.outputs.version }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
run: ./gradlew build
- name: Release (packages)
env:
VERSION: ${{ needs.versioning.outputs.version }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
run: ./gradlew publish
# endregion