Skip to content

Commit

Permalink
Merge pull request #4 from kaytu-io/fix-releases
Browse files Browse the repository at this point in the history
fix: sign windows exe file
  • Loading branch information
artaasadi authored Apr 26, 2024
2 parents 49eaa40 + 26c2ca3 commit a82297c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
# COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
# COSIGN_SECRET: ${{ secrets.COSIGN_SECRET }}
sign-windows:
Expand All @@ -98,8 +99,14 @@ jobs:
- name: Add windows zip
id: add_windows_zip
run: |
sudo apt update -y && sudo apt -y install cmake libssl-dev libcurl4-openssl-dev zlib1g-dev python3
sudo apt-get update -y
sudo apt-get -y install osslsigncode
echo "${{ secrets.SELFSIGNED_KEY }}" | base64 --decode > cert.key
echo "${{ secrets.SELFSIGNED_CRT }}" | base64 --decode > cert.crt
osslsigncode sign -certs cert.crt -key cert.key -n "Kaytu" -i https://kaytu.io/ -in kaytu_${{ steps.set_new_tag.outputs.new_tag }}_windows_amd64.exe -out kaytu.exe
mkdir kaytu_${{ steps.set_new_tag.outputs.new_tag }}_windows_amd64
mv kaytu_${{ steps.set_new_tag.outputs.new_tag }}_windows_amd64.exe kaytu_${{ steps.set_new_tag.outputs.new_tag }}_windows_amd64/kaytu.exe
mv kaytu.exe kaytu_${{ steps.set_new_tag.outputs.new_tag }}_windows_amd64
zip kaytu_${{ steps.set_new_tag.outputs.new_tag }}_windows_amd64.zip kaytu_${{ steps.set_new_tag.outputs.new_tag }}_windows_amd64
export UPLOAD_URL=$(curl --silent "https://api.github.com/repos/kaytu-io/kaytu/releases/latest" -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" | jq -r .upload_url)
echo "$UPLOAD_URL"
Expand Down
20 changes: 19 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,25 @@ archives:
- id: default
format: tar.gz
builds: [linux, darwin]

chocolateys:
name: kaytu
ids:
- kaytu
package_source_url: https://github.com/kaytu-io/kaytu
owners: Kaytu Inc.
title: kaytu
authors: Kaytu
project_url: https://kaytu.io/
tags: "kaytu"
summary: Kaytu cli program
description: Kaytu cli program
dependencies:
- id: nfpm
version: 2.20.0
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
skip_publish: false
goamd64: v1
#signs:
# - cmd: cosign
# stdin: "{{ .Env.COSIGN_PWD }}"
Expand Down

0 comments on commit a82297c

Please sign in to comment.