Skip to content

Commit 37f0b02

Browse files
committed
Sign based upon github ref
1 parent 04f75e7 commit 37f0b02

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/publish-nym-wallet-win11.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,24 @@ jobs:
4444

4545
- name: Download EV CodeSignTool from ssl.com
4646
working-directory: nym-wallet/src-tauri
47-
if: ${{ inputs.sign }}
47+
if: ${{ inputs.sign || startsWith(github.ref, 'refs/tags/nym-wallet-') }}
4848
shell: bash
4949
run: |
5050
curl -L0 https://www.ssl.com/download/codesigntool-for-linux-and-macos/ -o codesigntool.zip
5151
unzip codesigntool.zip
52+
chmod +x ./CodeSignTool.sh
53+
5254
- name: Get EV certificate credential id
5355
working-directory: nym-wallet/src-tauri
54-
if: ${{ inputs.sign }}
56+
if: ${{ inputs.sign || startsWith(github.ref, 'refs/tags/nym-wallet-') }}
5557
id: get_credential_ids
5658
shell: bash
5759
run: |
5860
echo "SSL_COM_CREDENTIAL_ID=$(./CodeSignTool.sh get_credential_ids -username=${{ secrets.SSL_COM_USERNAME }} -password=${{ secrets.SSL_COM_PASSWORD }} | sed -n '1!p' | sed 's/- //')" >> "$GITHUB_OUTPUT"
61+
5962
- name: Add custom sign command to tauri.conf.json
6063
working-directory: nym-wallet/src-tauri
61-
if: ${{ inputs.sign }}
64+
if: ${{ inputs.sign || startsWith(github.ref, 'refs/tags/nym-wallet-') }}
6265
shell: bash
6366
run: |
6467
yq eval --inplace '.bundle.windows +=
@@ -79,6 +82,7 @@ jobs:
7982
]
8083
}
8184
}' tauri.conf.json
85+
8286
- name: Install project dependencies
8387
shell: bash
8488
run: cd .. && yarn --network-timeout 100000
@@ -93,10 +97,10 @@ jobs:
9397
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9498
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
9599
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
96-
SSL_COM_USERNAME: ${{ inputs.sign && secrets.SSL_COM_USERNAME }}
97-
SSL_COM_PASSWORD: ${{ inputs.sign && secrets.SSL_COM_PASSWORD }}
98-
SSL_COM_CREDENTIAL_ID: ${{ inputs.sign && steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}
99-
SSL_COM_TOTP_SECRET: ${{ inputs.sign && secrets.SSL_COM_TOTP_SECRET }}
100+
SSL_COM_USERNAME: ${{ (inputs.sign || startsWith(github.ref, 'refs/tags/nym-wallet-')) && secrets.SSL_COM_USERNAME }}
101+
SSL_COM_PASSWORD: ${{ (inputs.sign || startsWith(github.ref, 'refs/tags/nym-wallet-')) && secrets.SSL_COM_PASSWORD }}
102+
SSL_COM_CREDENTIAL_ID: ${{ (inputs.sign || startsWith(github.ref, 'refs/tags/nym-wallet-')) && steps.get_credential_ids.outputs.SSL_COM_CREDENTIAL_ID }}
103+
SSL_COM_TOTP_SECRET: ${{ (inputs.sign || startsWith(github.ref, 'refs/tags/nym-wallet-')) && secrets.SSL_COM_TOTP_SECRET }}
100104
run: |
101105
echo "Starting build process..."
102106
yarn build
@@ -140,7 +144,7 @@ jobs:
140144
- id: create-release
141145
name: Upload to release based on tag name
142146
uses: softprops/action-gh-release@v2
143-
if: github.event_name == 'release'
147+
if: ${{ startsWith(github.ref, 'refs/tags/nym-wallet-') && github.event_name == 'release' }}
144148
with:
145149
files: |
146150
nym-wallet/${{ env.BUNDLE_PATH }}/msi/*.msi

0 commit comments

Comments
 (0)