Skip to content

Commit

Permalink
fix: updating windows release workflow (#347)
Browse files Browse the repository at this point in the history
* fix: updating windows release workflow

* Update release.yml
  • Loading branch information
kridai authored Dec 2, 2021
1 parent f969fca commit 608bff4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
needs: [update-api-definitions-changelog]
outputs:
tag-name: ${{ steps.semantic-release-draft.outputs.TAG_NAME }}
tag-name: ${{ steps.semantic-release.outputs.TAG_NAME }}
draft-tag-name: ${{ steps.semantic-release-draft.outputs.TAG_NAME }}
steps:
- name: Checkout cli
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/windows-executable-release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: Windows Executable Release
on:
workflow_dispatch:
inputs:
formula:
description: 'Artifact Prefix'
default: twilio
workflow_run:
# wait for Cli Release to complete, when it completes, start this workflow
workflows: ["Cli Release"]
branches: [main]
types:
- completed
inputs:
formula:
description: 'Artifact Prefix'
default: twilio
env:
FORMULA_NAME: 'twilio'

jobs:
get-tag:
runs-on: macos-latest
Expand All @@ -39,8 +34,8 @@ jobs:
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.inputs.formula }}-${{ needs.get-tag.outputs.TAG_NAME }}.exe
path: dist/win/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-x86.exe
name: ${{env.FORMULA_NAME}}-${{ needs.get-tag.outputs.TAG_NAME }}.exe
path: dist/win/${{env.FORMULA_NAME}}-v${{ needs.get-tag.outputs.TAG_NAME }}-x86.exe
retention-days: 1

sign-windows-release:
Expand All @@ -58,18 +53,18 @@ jobs:
id: download
uses: actions/download-artifact@v2
with:
name: ${{ github.event.inputs.formula }}-${{ needs.get-tag.outputs.TAG_NAME }}.exe
name: ${{env.FORMULA_NAME}}-${{ needs.get-tag.outputs.TAG_NAME }}.exe
- name: 'Echo download path'
run: ls ${{steps.download.outputs.download-path}}
- name: Code Sign The Executable
run: |
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERTIFICATE_PASS }}' /t http://timestamp.digicert.com ${{steps.download.outputs.download-path}}/${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-x86.exe
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERTIFICATE_PASS }}' /t http://timestamp.digicert.com ${{steps.download.outputs.download-path}}/${{env.FORMULA_NAME}}-v${{ needs.get-tag.outputs.TAG_NAME }}-x86.exe
- name: Upload binaries to release
run: node .github/scripts/update-platform-executables.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILE: ${{steps.download.outputs.download-path}}\${{ github.event.inputs.formula }}-v${{ needs.get-tag.outputs.TAG_NAME }}-x86.exe
ASSET_NAME: ${{ github.event.inputs.formula }}-${{ needs.get-tag.outputs.TAG_NAME }}.exe
FILE: ${{steps.download.outputs.download-path}}\${{env.FORMULA_NAME}}-v${{ needs.get-tag.outputs.TAG_NAME }}-x86.exe
ASSET_NAME: ${{env.FORMULA_NAME}}-${{ needs.get-tag.outputs.TAG_NAME }}.exe
TAG_NAME: ${{ needs.get-tag.outputs.TAG_NAME }}
REPO_NAME: twilio/twilio-cli

Expand All @@ -89,4 +84,4 @@ jobs:
SLACK_ICON_EMOJI: ":ship:"
SLACK_TITLE: "Twilio Cli"
SLACK_MESSAGE: 'Windows Executable Release Failed'
MSG_MINIMAL: actions url
MSG_MINIMAL: actions url

0 comments on commit 608bff4

Please sign in to comment.