Skip to content

Commit

Permalink
Update distribute-binaries.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bearaujus committed Dec 8, 2024
1 parent 51ee8ae commit 907bfe3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/distribute-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
sudo apt-get update
sudo apt-get install -y gcc g++ libc6-dev gcc-multilib g++-x86-64-linux-gnu osslsigncode openssl
- name: Build Go binary
run: |
GOOS=windows GOARCH=amd64 go build -o myapp .
- name: Import Private Key from GitHub Secrets
if: env.skip != 'true'
env:
Expand All @@ -37,4 +41,21 @@ jobs:
env:
REQUEST_CSR_SUBJECT: ${{ secrets.REQUEST_CSR_SUBJECT }}
run: |
openssl req -new -key private.key -out request.csr -subj "$REQUEST_CSR_SUBJECT"
openssl req -new -key private.key -out request.csr -subj "$REQUEST_CSR_SUBJECT"
- name: Self-Sign the CSR to Create a Certificate
run: |
openssl x509 -req -in request.csr -signkey private.key -out myapp-cert.pem
- name: Sign Binary with Private Key
run: |
openssl dgst -sha256 -sign private.key -out myapp.sig myapp
- name: Upload Signed Binary, Certificate, and Signature
uses: actions/upload-artifact@v2
with:
name: signed-binary-and-cert
path: |
myapp
myapp.sig
myapp-cert.pem

0 comments on commit 907bfe3

Please sign in to comment.