Skip to content

Commit

Permalink
Build workflow (#12)
Browse files Browse the repository at this point in the history
* Build workflow

* fix tag

* fix tab

* fix tab

* fix draft

* on push

* delimited

* tag

* test

* tag

* write

* final try

* try no upload

* test downloads

* fail 1m

* turn release public

* deploy

* remove dep

* remove arifacts

* rartifacts is back

* one release

* update nam
  • Loading branch information
DavidGOrtega authored Nov 19, 2023
1 parent 11df408 commit afbd0bd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
46 changes: 12 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: build

on:
push:
tags:
Expand All @@ -7,6 +8,9 @@ on:
jobs:
build:
runs-on: [self-hosted, M1]
permissions:
contents: write

steps:
- uses: actions/checkout@v2

Expand All @@ -27,14 +31,17 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
retention-days: 1
path: |
packages/008desktop/build/008-desktop-mac.dmg
packages/008desktop/build/008-desktop-win.exe
packages/008desktop/build/008-desktop-mac.dmg
packages/008desktop/build/008-desktop-linux.AppImage
sign-win:
needs: build
runs-on: [self-hosted, M1]
runs-on: windows-latest
permissions:
contents: write

steps:
- name: Download artifacts
Expand All @@ -46,41 +53,12 @@ jobs:
- name: Sign win
shell: bash
run: |
if [[ -z "${{ secrets.AZURE_CERT_NAME }}" ]]; then
echo "No cert available yet"
exit 1
fi
dotnet tool install --global AzureSignTool
AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v "bin/008-desktop-win.exe"
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
path: bin/008-desktop-win.exe

deploy:
permissions:
contents: write
needs: sign-win
runs-on: [self-hosted, M1]
if: always()

steps:
- name: Download binaries
uses: actions/download-artifact@v2
with:
name: artifact
path: bin

- name: Release
uses: softprops/action-gh-release@v1
with:
files: bin/*

- name: Upload agent008.ai
run: |
echo "${{ secrets.SITE_SSH_KEY }}" > agent008.pem
chmod 600 agent008.pem
scp -P ${{ secrets.SITE_PORT }} -i agent008.pem -r bin ${{ secrets.SITE }}:~/public/
draft: true
files: |
bin/008-desktop*
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: deploy

on:
release:
types: [released]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Upload agent008.ai
timeout-minutes: 10
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo kunzite-app/008 --pattern '008-desktop*' --dir bin
echo "${{ secrets.SITE_SSH_KEY }}" > agent008.pem
chmod 600 agent008.pem
scp -P ${{ secrets.SITE_PORT }} -i agent008.pem -r bin ${{ secrets.SITE_USER }}@${{ secrets.SITE_HOST }}:~/public

0 comments on commit afbd0bd

Please sign in to comment.