diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 39655fc..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 52ab9d8..fb04c2c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 }}/* \ No newline at end of file + ldflags: ${{ format('-X "main.Version={0}"', github.ref_name) }} \ No newline at end of file diff --git a/install_scripts/windows/install.bat b/install_scripts/windows/install.bat deleted file mode 100644 index e69de29..0000000 diff --git a/workflows/release.yaml b/workflows/release.yaml new file mode 100644 index 0000000..7712633 --- /dev/null +++ b/workflows/release.yaml @@ -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/go-release-action@v1.34 + 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 \ No newline at end of file