-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (45 loc) · 2.23 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
# Workflow that attaches the P2 update site asset to the new release.
# Does not handle hosting the P2 update site to be used by Eclipse directly.
name: release
on:
release:
types: [published]
jobs:
release-assets:
name: "Add assets to release"
runs-on: ubuntu-latest
steps:
# Build with maven
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: .m2
key: ${{ runner.os }}-m2-${{ hashFiles('.github/workflows/**/*.*', '**/pom.xml', '**/META-INF/MANIFEST.MF', 'build/de.cau.cs.kieler.spviz.targetplatform/de.cau.cs.kieler.spviz.targetplatform.target') }}
# This is done manually so that the version chantge is also comitted.
# - name: Set release version
# run: mvn org.eclipse.tycho:tycho-versions-plugin:2.7.3:set-version -DnewVersion="${GITHUB_REF##*/}" -f build/pom.xml
- name: Build with Maven
run: mvn --batch-mode --update-snapshots -f build/pom.xml verify
- name: Release tag
run: echo "::set-output name=SHORTENED_GITHUB_REF::${GITHUB_REF##*/}"
id: release-tag
# Upload update site zip to release
# Github has no official action for this. Uses: https://github.com/JasonEtco/upload-to-release
- name: Upload P2 Repository
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: "build/de.cau.cs.kieler.spviz.repository/target/de.cau.cs.kieler.spviz.repository-${{ steps.release-tag.outputs.SHORTENED_GITHUB_REF }}.zip application/zip"
- name: Upload CLI
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: "cli/de.cau.cs.kieler.spviz.cli/target/spviz-cli.jar"