-
Notifications
You must be signed in to change notification settings - Fork 4
104 lines (91 loc) · 2.94 KB
/
release_graalpy.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build and publish GraalPy
on:
workflow_dispatch:
inputs:
graalpy_version:
required: true
type: string
beta:
required: false
type: boolean
default: false
workflow_call:
inputs:
graalpy_version:
required: true
type: string
beta:
required: false
type: boolean
default: false
jobs:
build:
name: Build GraalPy ${{ inputs.graalpy_version }}
uses: ./.github/workflows/repackage_graalpy.yml
with:
graalpy_version: ${{ inputs.graalpy_version }}
platforms: "linux-x86_64,linux-aarch64,macos,windows"
publish:
name: Publish GraalPy ${{ inputs.graalpy_version }}
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get tags
run: git fetch --tags origin
- name: Download artifact
uses: actions/download-artifact@v4
with:
pattern: graalpy-*
path: /tmp/graalpy/
merge-multiple: true
- name: Get latest
run: |
echo "LATEST_TAG=$(./scripts/pick_semver.sh ${{ inputs.graalpy_version }} ${{ inputs.beta }} graalpy true)" >> $GITHUB_ENV
- name: Pick tag
id: pick_tag
run: |
SELECTED_TAG=$(./scripts/pick_semver.sh ${{ inputs.graalpy_version }} ${{ inputs.beta }} graalpy)
echo "SELECTED_TAG=$SELECTED_TAG" >> $GITHUB_ENV
echo "::set-output name=release_tag::$SELECTED_TAG"
- name: Create release
run: |
gh release create ${{ env.SELECTED_TAG }} \
--title ${{ env.SELECTED_TAG }} \
--target ${{ github.sha }} \
${{ env.LATEST_TAG && format('--generate-notes --notes-start-tag {0}', env.LATEST_TAG) || format('--notes "GraalPy {0}"', inputs.graalpy_version) }} \
${{ inputs.beta && '--prerelease' || '' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload files
uses: softprops/action-gh-release@v2
with:
files: /tmp/graalpy/graalpy*linux*.zip
tag_name: ${{ env.SELECTED_TAG }}
- name: Upload files
uses: softprops/action-gh-release@v2
with:
files: /tmp/graalpy/graalpy*darwin*.zip
tag_name: ${{ env.SELECTED_TAG }}
- name: Upload files
uses: softprops/action-gh-release@v2
with:
files: /tmp/graalpy/graalpy*windows*.zip
tag_name: ${{ env.SELECTED_TAG }}
outputs:
release_tag: ${{ steps.pick_tag.outputs.release_tag }}
update_installers:
name: Update installers
needs: publish
permissions:
contents: write
uses: ./.github/workflows/update_nodejs_installers.yml
with:
version: ${{ inputs.graalpy_version }}
release_tag: ${{ needs.publish.outputs.release_tag }}
beta: ${{ inputs.beta }}
implementation: graalpy
secrets: inherit