-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (72 loc) · 2.78 KB
/
release.yml
File metadata and controls
89 lines (72 loc) · 2.78 KB
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Publish release
on:
release:
types: [created]
jobs:
release:
name: Release and publish
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Set up JDK 8
id: java-8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- uses: cactuslab/maven-toolchains-xml-action@v1
with:
toolchains: |
[
{"type":"jdk", "jdkVersion": "8", "jdkHome": "${{steps.java-8.outputs.path}}", "provides": { "id":"JavaSE-1.8", "vendor":"Eclipse" } }
]
- name: Update version number
run: mvn org.eclipse.tycho:tycho-versions-plugin:1.7.0:set-version -DnewVersion=${{ github.ref_name }}
- name: Build with Maven
run: mvn -B deploy --file pom.xml -Pflat-repo --batch-mode
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach p2 update site
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: releng/aev.update/target/flat-repository/*
file_glob: true
- name: Get next version
uses: reecetech/version-increment@2024.10.1
id: next-version
with:
scheme: semver
increment: patch
- name: Commit changes and move release tag
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit --allow-empty -a -m "Release ${{ github.ref_name }}"
git tag -f ${{ github.ref_name }}
git push --tags --force
- name: Bump version numbers for next cycle
run: mvn org.eclipse.tycho:tycho-versions-plugin:1.7.0:set-version -DnewVersion=${{ steps.next-version.outputs.version }}-SNAPSHOT
- name: Commit version number change
run: |
git commit -a -m "Starting ${{ steps.next-version.outputs.version }} development"
git push