Skip to content

Commit

Permalink
feat: switching to manual release
Browse files Browse the repository at this point in the history
  • Loading branch information
praetoriansentry committed Nov 7, 2022
1 parent 4662edd commit 003df32
Showing 1 changed file with 39 additions and 21 deletions.
60 changes: 39 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,46 @@ permissions:
# issues: write

jobs:
goreleaser:
manual-release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
fetch-depth: 0
-
name: Fetch all tags
run: git fetch --force --tags
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
go-version: '>=1.18.0'
- name: install cargo deps and build avail
shell: bash
run: |
pwd
make cross
pushd out
echo -n "${{github.ref_name}}" | sed 's/^v//' | tee ref_name.txt
readonly tag_name="$(cat ref_name.txt)"
echo "$tag_name"
mkdir polycli_${tag_name}_darwin_amd64/
mv darwin-amd64-polycli polycli_${tag_name}_darwin_amd64/polycli
tar czf polycli_${tag_name}_darwin_amd64.tar.gz polycli_${tag_name}_darwin_amd64/
mkdir polycli_${tag_name}_darwin_arm64/
mv darwin-arm64-polycli polycli_${tag_name}_darwin_arm64/polycli
tar czf polycli_${tag_name}_darwin_arm64.tar.gz polycli_${tag_name}_darwin_arm64/
mkdir polycli_${tag_name}_linux_amd64/
mv linux-amd64-polycli polycli_${tag_name}_linux_amd64/polycli
tar czf polycli_${tag_name}_linux_amd64.tar.gz polycli_${tag_name}_linux_amd64/
mkdir polycli_${tag_name}_linux_arm64/
mv linux-arm64-polycli polycli_${tag_name}_linux_arm64/polycli
tar czf polycli_${tag_name}_linux_arm64.tar.gz polycli_${tag_name}_linux_arm64/
popd
- name: publish binaries
uses: svenstaro/upload-release-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
repo_token: ${{ secrets.PAT_TOKEN }}
file: out/*.tar.gz
release_name: ${{ steps.prepare.outputs.tag_name }}
tag: ${{ steps.prepare.outputs.tag_name }}
overwrite: true
file_glob: true

0 comments on commit 003df32

Please sign in to comment.