forked from oracle/opengrok
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 2.15 KB
/
release.yml
File metadata and controls
67 lines (64 loc) · 2.15 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
name: Release
# TODO: run this only for the oracle/opengrok repository
on:
release:
types: [created]
permissions:
contents: write
jobs:
get_tag:
name: Get tag name
outputs:
tag: ${{ steps.get_tag.outputs.tag }}
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get the tag name
id: get_tag
env:
OPENGROK_REF: ${{ github.ref }}
run: ./dev/ref2tag.sh
build:
runs-on: ubuntu-latest
needs: get_tag
steps:
- name: Checkout master branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'oracle'
java-version: '21'
- name: Cache Maven packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Checkout Universal ctags
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: universal-ctags/ctags
path: ctags
- name: Install pre-requisites
run: ./dev/before_install
- name: Before build actions
run: ./dev/before
- name: Build
run: ./mvnw -DskipTests=true -Dmaven.javadoc.skip=false -B -V package
- name: Get upload URL
id: get_upload_url
env:
OPENGROK_TAG: ${{ needs.get_tag.outputs.tag }}
run: dev/get_upload_url.sh
- name: Upload release tarball
id: upload-release-asset
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: ./distribution/target/opengrok-${{ needs.get_tag.outputs.tag }}.tar.gz
asset_name: opengrok-${{ needs.get_tag.outputs.tag }}.tar.gz
asset_content_type: application/octet-stream