This repository has been archived by the owner on Aug 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add separate release and push update workflows
- Loading branch information
Showing
2 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Push Update | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push-update-windows: | ||
name: Push Update | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags | ||
|
||
- name: 'Get Previous tag' | ||
id: previoustag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Download artifact | ||
id: download-artifact | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
github_token: ${{secrets.GITHUB_TOKEN}} | ||
workflow: release-app.yaml | ||
workflow_conclusion: success | ||
branch: master | ||
event: push | ||
path: ./binaries | ||
if_no_artifact_found: fail | ||
|
||
- name: Install go-selfupdate | ||
run: go install github.com/sanbornm/go-selfupdate/cmd/go-selfupdate@latest | ||
|
||
- name: Create update manifest and archive | ||
id: create_manifest_and_archive | ||
shell: bash | ||
run: | | ||
go-selfupdate -o update ./binaries ${{ steps.previoustag.outputs.tag }} | ||
- name: Upload update manifest and archive to S3 | ||
uses: shallwefootball/s3-upload-action@master | ||
with: | ||
aws_key_id: ${{ secrets.AWS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | ||
aws_bucket: ${{ secrets.AWS_BUCKET }} | ||
endpoint: ${{ secrets.AWS_ENDPOINT }} | ||
source_dir: 'update' | ||
destination_dir: 'update' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
- uses: dAppServer/wails-build-action@v2.2 | ||
with: | ||
build-name: geemo.exe | ||
build-platform: windows/amd64 | ||
package: false | ||
nsis: false | ||
|
||
- name: Upload Artifact in GOOS-GOARCH format | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-amd64 | ||
path: ./build/bin/geemo.exe | ||
|
||
release: | ||
name: Release | ||
needs: build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Zip | ||
run: | | ||
cd ./build/bin | ||
zip -r geemo-${{github.ref_name}}.zip geemo.exe | ||
mv geemo-${{github.ref_name}}.zip ../../ | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: geemo-${{github.ref_name}}.zip | ||
draft: true |