This repository has been archived by the owner on Aug 24, 2024. It is now read-only.
v0.4.0 #12
Workflow file for this run
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
name: Push Update | |
on: | |
release: | |
types: [published] | |
jobs: | |
push-update-windows: | |
name: Push Update | |
runs-on: ubuntu-20.04 | |
permissions: | |
actions: read | |
contents: read | |
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 | |
path: ./artifact | |
if_no_artifact_found: fail | |
- name: Rename executables to GOOS-GOARCH format | |
run: | | |
mkdir ./binaries | |
cd ./artifact/windows-amd64 | |
ls -R | |
mv geemo.exe ../../binaries/windows-amd64 | |
cd ../../artifact/linux-amd64 | |
mv geemo ../../binaries/linux-amd64 | |
- 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' |