Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: publishing error #8

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/go-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,46 +39,46 @@ jobs:

- name: Linux build
run: |
go build -o cmd/${{ github.event.repository.name }} ./cmd/${{ github.event.repository.name }}/
cd ./cmd
go build -o /tmp/${{ github.event.repository.name }} ./cmd/${{ github.event.repository.name }}/
cd /tmp
tar -czf ${{ github.event.repository.name }}-linux-${{ github.event.release.tag_name }}.tar.gz ./${{ github.event.repository.name }}
rm ./${{ github.event.repository.name }}

- name: Windows build
run: |
GOOS=windows GOARCH=amd64 go build -o cmd/${{ github.event.repository.name }}.exe ./cmd/${{ github.event.repository.name }}/
cd ./cmd
GOOS=windows GOARCH=amd64 go build -o /tmp/${{ github.event.repository.name }}.exe ./cmd/${{ github.event.repository.name }}/
cd /tmp
zip ${{ github.event.repository.name }}-windows-${{ github.event.release.tag_name }}.zip ./${{ github.event.repository.name }}.exe
rm ./${{ github.event.repository.name }}.exe

- name: Darwin build
run: |
GOOS=darwin GOARCH=amd64 go build -o cmd/${{ github.event.repository.name }} ./cmd/${{ github.event.repository.name }}/
cd ./cmd
GOOS=darwin GOARCH=amd64 go build -o /tmp/${{ github.event.repository.name }} ./cmd/${{ github.event.repository.name }}/
cd /tmp
tar -czf ${{ github.event.repository.name }}-darwin-${{ github.event.release.tag_name }}.tar.gz ./${{ github.event.repository.name }}
rm ./${{ github.event.repository.name }}

- name: Upload release assets
uses: softprops/action-gh-release@v1
with:
files: |
cmd/${{ github.event.repository.name }}-darwin-${{ github.event.release.tag_name }}.tar.gz
cmd/${{ github.event.repository.name }}-linux-${{ github.event.release.tag_name }}.tar.gz
cmd/${{ github.event.repository.name }}-windows-${{ github.event.release.tag_name }}.zip
/tmp/${{ github.event.repository.name }}-darwin-${{ github.event.release.tag_name }}.tar.gz
/tmp/${{ github.event.repository.name }}-linux-${{ github.event.release.tag_name }}.tar.gz
/tmp/${{ github.event.repository.name }}-windows-${{ github.event.release.tag_name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload linux artifact
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-linux-${{ github.event.release.tag_name }}.tar.gz
path: cmd/${{ github.event.repository.name }}-linux-${{ github.event.release.tag_name }}.tar.gz
path: /tmp/${{ github.event.repository.name }}-linux-${{ github.event.release.tag_name }}.tar.gz

- name: Upload windows artifact
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-windows-${{ github.event.release.tag_name }}.zip
path: cmd/${{ github.event.repository.name }}-windows-${{ github.event.release.tag_name }}.tar.gz
path: /tmp/${{ github.event.repository.name }}-windows-${{ github.event.release.tag_name }}.tar.gz

##########################
# Stop deployment #
Expand Down
Loading