Skip to content

Commit 282b2f1

Browse files
committed
ICU-23246 Signing artifacts on icu4x/ releases
1 parent 4db86ea commit 282b2f1

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

.github/workflows/release-check-sign.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515

1616
jobs:
1717
sign_and_checksums:
18-
if: ${{ inputs.gitReleaseTag && (startsWith(inputs.gitReleaseTag, 'release-') || startsWith(inputs.gitReleaseTag, 'icu4x/')) }}
18+
if: ${{ inputs.gitReleaseTag && startsWith(inputs.gitReleaseTag, 'release-') }}
1919
runs-on: ubuntu-22.04 # Updated in BRS
2020
environment: release-env
2121

@@ -48,7 +48,6 @@ jobs:
4848
run: |
4949
source icu4j/releases_tools/shared.sh
5050
pushd ${RELEASE_FOLDER}
51-
rm *.asc
5251
sha512sum -b icu4c* > SHASUM512.txt
5352
md5sum -b *.jar > icu4j-${github_rel_version}.md5
5453
md5sum -b icu4c-*-data-bin-*.zip > icu4c-${github_rel_version}-binary.md5
@@ -66,3 +65,47 @@ jobs:
6665
gh release upload ${{ inputs.gitReleaseTag }} ${RELEASE_FOLDER}/SHASUM512.txt --clobber --repo=${{ github.repository }}
6766
env:
6867
GH_TOKEN: ${{ github.token }}
68+
69+
sign_and_checksums_icu4x:
70+
if: ${{ inputs.gitReleaseTag && startsWith(inputs.gitReleaseTag, 'icu4x/') }}
71+
runs-on: ubuntu-22.04 # Updated in BRS
72+
environment: release-env
73+
74+
permissions:
75+
contents: write # So that we can upload to release
76+
77+
steps:
78+
79+
- name: Checkout and setup
80+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
81+
82+
- name: Set up JDK
83+
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
84+
with:
85+
java-version: '11'
86+
distribution: 'temurin'
87+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
88+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
89+
90+
- name: Get all release files
91+
run: |
92+
mkdir -p ${RELEASE_FOLDER}
93+
pushd ${RELEASE_FOLDER}
94+
gh release download ${{ inputs.gitReleaseTag }} -p "*.zip" --repo=${{ github.repository }}
95+
popd
96+
env:
97+
GH_TOKEN: ${{ github.token }}
98+
99+
- name: Checksums and sign
100+
run: |
101+
pushd ${RELEASE_FOLDER}
102+
find . -type f -exec gpg --no-tty --batch --pinentry-mode loopback --passphrase=$MAVEN_GPG_PASSPHRASE -a --output {}.asc --detach-sig {} \;
103+
popd
104+
env:
105+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
106+
107+
- name: Upload to release
108+
run: |
109+
gh release upload ${{ inputs.gitReleaseTag }} ${RELEASE_FOLDER}/*.asc --clobber --repo=${{ github.repository }}
110+
env:
111+
GH_TOKEN: ${{ github.token }}

.github/workflows/scorecard.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- cron: "23 15 * * 6"
1414
push:
1515
branches: ["main"]
16+
workflow_dispatch:
17+
# To trigger the Env Test workflow manually, follow the instructions in
18+
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
1619

1720
# Declare default permissions as read only.
1821
permissions: read-all

0 commit comments

Comments
 (0)