ci: polishes fork PR protect (#1191)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
7
.github/workflows/release.yaml
vendored
7
.github/workflows/release.yaml
vendored
@@ -52,7 +52,7 @@ jobs:
|
||||
- name: Download Windows code signing certificate
|
||||
env:
|
||||
WINDOWS_CODESIGN_P12_BASE64: ${{ secrets.WINDOWS_CODESIGN_P12_BASE64 }}
|
||||
run: |
|
||||
run: | # On the fork PRs, our org secret is not visible.
|
||||
if [ $WINDOWS_CODESIGN_P12_BASE64 ]; then
|
||||
echo $WINDOWS_CODESIGN_P12_BASE64 | base64 --decode > windows-certificate.p12
|
||||
echo "WINDOWS_CODESIGN_P12=windows-certificate.p12" >> $GITHUB_ENV
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
env:
|
||||
WINDOWS_CODESIGN_P12_BASE64: ${{ secrets.WINDOWS_CODESIGN_P12_BASE64 }}
|
||||
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
|
||||
run: |
|
||||
run: | # On the fork PRs, our org secret is not visible. We unset the required env so that `make dist` uses default self-signed cert.
|
||||
if [ -n $WINDOWS_CODESIGN_P12_BASE64 ]; then
|
||||
unset WINDOWS_CODESIGN_PASSWORD
|
||||
fi
|
||||
@@ -78,9 +78,6 @@ jobs:
|
||||
WINDOWS_CODESIGN_P12_BASE64: ${{ secrets.WINDOWS_CODESIGN_P12_BASE64 }}
|
||||
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
|
||||
run: | # Note: MSI_VERSION requires . as a separator, so replace "-" in the tag with ".".
|
||||
if [ -n $WINDOWS_CODESIGN_P12_BASE64 ]; then
|
||||
unset WINDOWS_CODESIGN_PASSWORD
|
||||
fi
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
MSI_VERSION=${VERSION//-/.}
|
||||
make dist VERSION=$VERSION MSI_VERSION=$MSI_VERSION
|
||||
|
||||
Reference in New Issue
Block a user