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
64 lines (55 loc) · 1.9 KB
/
push-update.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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'