Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

build.yml 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ---
  2. name: "Build Release"
  3. on:
  4. push:
  5. tags:
  6. - "v*"
  7. jobs:
  8. tagged-release:
  9. name: "Build Release"
  10. runs-on: "ubuntu-latest"
  11. steps:
  12. - uses: actions/checkout@v2
  13. - name: Login to GitHub Container Registry
  14. uses: docker/login-action@v1
  15. with:
  16. registry: ghcr.io
  17. username: ${{ github.actor }}
  18. password: ${{ secrets.GITHUB_TOKEN }}
  19. - name: Docker meta
  20. id: meta
  21. uses: docker/metadata-action@v3
  22. with:
  23. images: |
  24. ghcr.io/irccloud/irccat
  25. tags: |
  26. type=semver,pattern={{version}}
  27. type=sha
  28. - uses: actions/setup-go@v2
  29. with:
  30. go-version: "^1.17.3"
  31. - name: Check Formatting
  32. run: gofmt -d -e .
  33. - name: Tests
  34. run: go test -v ./...
  35. - name: Build
  36. run: |
  37. go get github.com/mitchellh/gox
  38. gox -ldflags="-X main.branch=${{github.ref_name}} -X main.revision=${{github.sha}}" -osarch="linux/amd64 linux/arm darwin/amd64" -output="dist/{{.OS}}_{{.Arch}}_{{.Dir}}"
  39. - name: Build and push Dockerfile
  40. id: docker_build
  41. uses: docker/build-push-action@v2
  42. with:
  43. file: ./Dockerfile
  44. push: true
  45. tags: ${{ steps.meta.outputs.tags }}
  46. labels: ${{ steps.meta.outputs.labels }}
  47. - uses: "marvinpinto/action-automatic-releases@latest"
  48. with:
  49. repo_token: "${{ secrets.GITHUB_TOKEN }}"
  50. prerelease: false
  51. files: |
  52. dist/linux_amd64_irccat
  53. dist/linux_arm_irccat
  54. dist/darwin_amd64_irccat