release.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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: Setup Java
  23. run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
  24. - name: Build
  25. env:
  26. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  27. run: ./gradlew build clean
  28. - name: Setup Node.js
  29. uses: actions/setup-node@v4
  30. with:
  31. node-version: "lts/*"
  32. cache: 'npm'
  33. - name: Install dependencies
  34. run: npm install
  35. - name: Import GPG key
  36. uses: crazy-max/ghaction-import-gpg@v6
  37. with:
  38. gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
  39. passphrase: ${{ secrets.GPG_PASSPHRASE }}
  40. fingerprint: ${{ vars.GPG_FINGERPRINT }}
  41. - name: Release
  42. env:
  43. GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
  44. run: npm exec semantic-release