Skip to content

Commit

Permalink
Merge pull request #8 from IvanKuchin/development
Browse files Browse the repository at this point in the history
Bugfix: publishing error
  • Loading branch information
IvanKuchin authored Dec 30, 2023
2 parents 418765d + ff1b0c9 commit 777eb94
Showing 1 changed file with 11 additions and 11 deletions.
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

0 comments on commit 777eb94

Please sign in to comment.