macos-release.yml 995 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: macOS Release
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. jobs:
  7. release:
  8. runs-on: macos-latest
  9. steps:
  10. - name: Checkout
  11. uses: actions/checkout@v3
  12. with:
  13. fetch-depth: 0
  14. - uses: actions/setup-node@v3
  15. with:
  16. node-version: 16
  17. - name: Build Frontend
  18. env:
  19. CI: ""
  20. run: |
  21. cd web
  22. npm install
  23. REACT_APP_VERSION=$(git describe --tags) npm run build
  24. cd ..
  25. - name: Set up Go
  26. uses: actions/setup-go@v3
  27. with:
  28. go-version: '>=1.18.0'
  29. - name: Build Backend
  30. run: |
  31. go mod download
  32. go build -ldflags "-X 'message-pusher/common.Version=$(git describe --tags)'" -o message-pusher-macos
  33. - name: Release
  34. uses: softprops/action-gh-release@v1
  35. if: startsWith(github.ref, 'refs/tags/')
  36. with:
  37. files: message-pusher-macos
  38. env:
  39. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}