Skip to content

Commit

Permalink
ci: trying to push binaries reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0elliot committed Jun 30, 2024
1 parent a5f00c0 commit 02fd7ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/binary-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
cd shuffle_email_rules/lib/
go mod tidy
mkdir -p build/${{ matrix.goos }}_${{ matrix.goarch }}
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/${{ matrix.goos }}_${{ matrix.goarch }}/libshuffleemail_${{ matrix.goos }} -buildmode=c-shared -v
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/libshuffleemail_{{ matrix.goos }}_{{ matrix.goarch }} -buildmode=c-shared -v
env:
CGO_ENABLED: 1

Expand All @@ -46,22 +46,8 @@ jobs:
cd shuffle_email_rules/lib/
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
branch_name="binaries-${{ github.sha }}"
git checkout -b $branch_name
mkdir -p binaries/${{ matrix.goos }}_${{ matrix.goarch }}
mv build/${{ matrix.goos }}_${{ matrix.goarch }}/libshuffleemail_${{ matrix.goos }} binaries/${{ matrix.goos }}_${{ matrix.goarch }}/
mkdir -p binaries/
mv build/libshuffleemail_{{ matrix.goos }}_{{ matrix.goarch }} binaries/
git add binaries/
git commit -m "Add compiled binaries for ${{ matrix.goos }}_${{ matrix.goarch }}"
git push origin $branch_name
- name: Create pull request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Add compiled binaries for ${{ matrix.goos }}_${{ matrix.goarch }}
branch: main
title: Add compiled binaries
body: |
This PR adds the compiled binaries for the following platform and architecture:
- OS: ${{ matrix.goos }}
- Architecture: ${{ matrix.goarch }}
git commit -m "Add compiled binaries for ${{ matrix.goos }} - ${{ matrix.goarch }}"
git push origin main
Empty file.
Binary file not shown.

0 comments on commit 02fd7ad

Please sign in to comment.