Skip to content

Commit

Permalink
Use proper variables in bash commands
Browse files Browse the repository at this point in the history
  • Loading branch information
alinz committed Jan 11, 2024
1 parent 7a5e76f commit 1c6e7ca
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,38 @@ jobs:
- name: Setup Repo
uses: actions/checkout@v3

- name: Check ENVs
run: printenv
- name: Install dependencies
run: go mod tidy

# - name: Run Unit Tests
# run: go test -v ./...
- name: Run Unit Tests
run: go test -v ./...

# - name: Build temporary cli
# run: go build -o ./selfupdate ./cmd/selfupdate/main.go
- name: Build temporary cli
run: go build -o ./selfupdate ./cmd/selfupdate/main.go

# - 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 }}
- 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
# - 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 }} \
# ./cmd/selfupdate/main.go
- 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 }} \
./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 }}
- 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 }}

0 comments on commit 1c6e7ca

Please sign in to comment.