File tree Expand file tree Collapse file tree 1 file changed +34
-9
lines changed Expand file tree Collapse file tree 1 file changed +34
-9
lines changed Original file line number Diff line number Diff line change 11name : build-kopia-android
22on :
33 workflow_dispatch :
4+ inputs :
5+ kopia-version :
6+ description : ' Kopia version (e.g. v0.21.1)'
7+ required : true
8+ default : ' v0.21.1'
49
510jobs :
611 build :
@@ -35,16 +40,36 @@ jobs:
3540 export CGO_ENABLED=1
3641
3742 # IMPORTANT: unset GOBIN for cross-installs
38- env -u GOBIN go install -tags netcgo github.com/kopia/kopia@v0.21.1
43+ env -u GOBIN go install -tags netcgo github.com/kopia/kopia@${{ github.event.inputs.kopia-version }}
3944
40- TARGET_BIN_DIR="$(go env GOPATH)/bin/${GOOS}_${GOARCH}"
41- ls -l "$TARGET_BIN_DIR"
42- mkdir -p out
43- cp "$TARGET_BIN_DIR/kopia" out/kopia
44- file out/kopia
45+ BIN_DIR="$(go env GOPATH)/bin/${GOOS}_${GOARCH}"
46+ mkdir -p dist
47+ cp "$BIN_DIR/kopia" dist/kopia-android-arm64
48+ (cd dist && sha256sum kopia-android-arm64 > kopia-android-arm64.sha256)
4549
46- - name : Upload Android binary
50+ - name : Upload artifact
4751 uses : actions/upload-artifact@v4
4852 with :
49- name : kopia-android-arm64
50- path : out/kopia
53+ name : kopia-android # <-- artifact name consumed by next job
54+ path : dist/*
55+
56+ release :
57+ needs : build
58+ runs-on : ubuntu-latest
59+
60+ steps :
61+ - name : Download artifact
62+ uses : actions/download-artifact@v4
63+ with :
64+ name : ${{ needs.build.outputs.artifact-name }}
65+
66+ - name : Create GitHub Release
67+ uses : softprops/action-gh-release@v2
68+ with :
69+ files : |
70+ kopia-android-arm64
71+ kopia-android-arm64.sha256
72+ draft : false
73+ prerelease : false
74+ env :
75+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments