Skip to content

Commit

Permalink
Clean up code and hope github actions reads my env
Browse files Browse the repository at this point in the history
  • Loading branch information
alinz committed Jan 11, 2024
1 parent 1c6e7ca commit 2d9a962
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,27 @@ jobs:

- name: Create a Release
run: |
./selfupdate github release \
--owner blockthrough \
--repo selfupdate.go \
--version $SELF_UPDATE_VERSION \
--title $SELF_UPDATE_VERSION \
--token $SELF_UPDATE_GH_TOKEN
./selfupdate github release
--owner blockthrough \
--repo selfupdate.go \
--version ${{ env.SELF_UPDATE_VERSION }} \
--title ${{ env.SELF_UPDATE_VERSION }} \
--token ${{ env.SELF_UPDATE_GH_TOKEN }}
- name: Build and Sign
run: |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} \
go build \
-ldflags "-X main.Version=$SELF_UPDATE_VERSION -X main.PublicKey=$SELF_UPDATE_PUBLIC_KEY" \
-o ./selfupdate-${{ matrix.os }}-${{ matrix.arch }} \
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} \
go build \
-ldflags "-X main.Version=${{ env.SELF_UPDATE_VERSION }} -X main.PublicKey=${{ env.SELF_UPDATE_PUBLIC_KEY }}" \
-o ./selfupdate-${{ matrix.os }}-${{ matrix.arch }} \
./cmd/selfupdate/main.go
- name: Upload New Release
run: |
./selfupdate github upload \
--owner blockthrough \
--repo selfupdate.go \
--filename selfupdate-${{ matrix.os }}-${{ matrix.arch }}.sign \
--version $SELF_UPDATE_VERSION \
--token $SELF_UPDATE_GH_TOKEN \
--key $SELF_UPDATE_PRIVATE_KEY < ./selfupdate-${{ matrix.os }}-${{ matrix.arch }}
./selfupdate github upload \
--owner blockthrough \
--repo selfupdate.go \
--filename selfupdate-${{ matrix.os }}-${{ matrix.arch }}.sign \
--version ${{ env.SELF_UPDATE_VERSION }} \
--token ${{ env.SELF_UPDATE_GH_TOKEN }} \
--key ${{ env.SELF_UPDATE_PRIVATE_KEY }} < ./selfupdate-${{ matrix.os }}-${{ matrix.arch }}

0 comments on commit 2d9a962

Please sign in to comment.