release.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Release
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches:
  6. - main
  7. - dev
  8. jobs:
  9. release:
  10. name: Release
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout
  14. uses: actions/checkout@v4
  15. with:
  16. # Make sure the release step uses its own credentials:
  17. # https://github.com/cycjimmy/semantic-release-action#private-packages
  18. persist-credentials: false
  19. fetch-depth: 0
  20. - name: Cache Gradle
  21. uses: burrunan/gradle-cache-action@v1
  22. - name: Build
  23. env:
  24. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  25. run: ./gradlew build clean
  26. - name: Setup Node.js
  27. uses: actions/setup-node@v4
  28. with:
  29. node-version: "lts/*"
  30. cache: 'npm'
  31. - name: Install dependencies
  32. run: npm install
  33. - name: Import GPG key
  34. uses: crazy-max/ghaction-import-gpg@v6
  35. with:
  36. gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
  37. passphrase: ${{ secrets.GPG_PASSPHRASE }}
  38. fingerprint: ${{ env.GPG_FINGERPRINT }}
  39. - name: Release
  40. env:
  41. GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
  42. run: npm exec semantic-release