Skip to content

Commit

Permalink
Revert "fix: fixed release script (#26)" (#27)
Browse files Browse the repository at this point in the history
This reverts commit 2d7b428.
  • Loading branch information
neelam-harness authored Jul 14, 2023
1 parent 2d7b428 commit 5f380f8
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ jobs:
goversion: 1.19
project_path: "."
binary_name: "harness"
ldflags: ${{ format('-X "main.Version={0}"', github.ref_name) }}
extra_files: ./install_scripts/${{ matrix.goos }}/*
ldflags: ${{ format('-X "main.Version={0}"', github.ref_name) }}
Empty file.
54 changes: 54 additions & 0 deletions workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
release:
types: [created]
push:
branches: [ "feat/install-cli" ]
pull_request:
branches: [ "feat/install-cli" ]
permissions:
contents: write
packages: write

jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: 1.19
project_path: "."
binary_name: "harness"
ldflags: ${{ format('-X "main.Version={0}"', github.ref_name) }}

- name: Move binary to the release directory
run: |
mkdir release
mv harness release/
cp ./install_scripts/${{ matrix.goos }}/* release/
working-directory: ${{ github.workspace }}

- name: Bundle everything inside release directory
run: |
tar czvf release.tar.gz release/
working-directory: ${{ github.workspace }}

- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-artifacts
path: release.tar.gz

0 comments on commit 5f380f8

Please sign in to comment.