-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (68 loc) · 2.21 KB
/
Copy pathrelease.yml
File metadata and controls
78 lines (68 loc) · 2.21 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
name: Create new release
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for the release (e.g., 1.0.0)'
required: true
default: '0.0.0'
draft-release:
description: 'Should this release be a draft?'
type: boolean
required: false
default: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
include:
- os: ubuntu-latest
graalvm-home: /usr/lib/graalvm
- os: windows-latest
graalvm-home: C:\graalvm
- os: macos-latest
graalvm-home: /Library/Java/JavaVirtualMachines/graalvm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.12'
distribution: 'graalvm'
#github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build native executable
run: ./gradlew nativeImage -Pversion="${{ github.event.inputs.tag }}"
- name: Upload native executable
uses: actions/upload-artifact@v4
with:
name: native-executable-${{ matrix.os }}
path: build/native-image/fern-junit-client*
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Make artifacts executable
run: chmod +x artifacts/native-executable-*
- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: "${{ github.event.inputs.draft-release }}"
generateReleaseNotes: true
artifacts: artifacts/**
#token: ${{ secrets.GITHUB_TOKEN }}
tag: 'v${{ github.event.inputs.tag }}'
name: 'v${{ github.event.inputs.tag }}'
- name: Add release URL to job summary
if: success()
run: |
echo "Release URL: ${{ steps.create_release.outputs.html_url }}"
echo "Release URL: ${{ steps.create_release.outputs.html_url }}" >> $GITHUB_STEP_SUMMARY