-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (80 loc) · 2.71 KB
/
release.yml
File metadata and controls
80 lines (80 loc) · 2.71 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
# Generated from Workflow.pkl. DO NOT EDIT.
name: Release
'on':
push:
branches-ignore:
- '**'
tags:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
release-to-github:
name: Release to GitHub
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
VERSION: ${{ github.ref_name }}
run: |-
gh release create "${VERSION}" \
--title "${VERSION}" \
--verify-tag \
--notes "Release notes: https://pkl-lang.org/spring/current/changelog.html#release-${VERSION}"
release-to-maven:
name: Release to maven
needs: release-to-github
runs-on: ubuntu-latest
environment: maven-release
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '21'
distribution: temurin
- name: Deploy to maven
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
run: ./gradlew -DreleaseBuild=true build publishToSonatype closeAndReleaseSonatypeStagingRepository
trigger-downstream-builds:
if: github.repository_owner == 'apple'
needs:
- release-to-github
- release-to-maven
runs-on: ubuntu-latest
steps:
- name: Create app token
id: app-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ secrets.PKL_CI_CLIENT_ID }}
private-key: ${{ secrets.PKL_CI }}
owner: ${{ github.repository_owner }}
- name: Trigger pkl-lang.org build
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
SOURCE_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |-
gh workflow run \
--repo apple/pkl-lang.org \
--ref main \
--field source_run="${SOURCE_RUN}" \
main.yml