-
Notifications
You must be signed in to change notification settings - Fork 48
69 lines (67 loc) · 2.19 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
name: Release
on:
workflow_dispatch:
inputs:
full-release:
type: boolean
description: |
Full release, i.e., non-snapshot.
This is only respected when the workflow runs on the main branch.
permissions:
contents: write
pages: write
id-token: write
jobs:
release-plugin:
runs-on:
- ubuntu-22.04
timeout-minutes: 10
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for git-based changelog.
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 21
cache: 'sbt'
- uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Assemble
run: task jvmAssemble
- name: Publish Release
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.full-release == 'true' }}
run: task jvmPublishRelease
- name: Publish Snapshot
if: ${{ github.event.inputs.full-release != 'true' }}
run: task jvmPublishSnapshot VERSION=$(cat version)-SNAPSHOT-${{ github.run_number }}${{ github.run_attempt }}
release-python-client:
needs: release-plugin
runs-on:
- ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10.8'
cache: 'pip'
- uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup pypirc file
env:
TESTPYPI_TOKEN: ${{ secrets.TESTPYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: envsubst < .github/workflows/pypirc.template > $HOME/.pypirc
- name: Setup Setuptools
run: python3 -m pip install setuptools
- name: Publish Release
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.full-release == 'true' }}
run: task pyPublishRelease
- name: Publish Snapshot
if: ${{ github.event.inputs.full-release != 'true' }}
run: task pyPublishSnapshot VERSION=$(cat version)-dev${{ github.run_number }}${{ github.run_attempt }}