Update remaining GitHub actions to avoid deprecated Node 16 versions … #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
uses: ./.github/workflows/test.yml | |
publish-docs: | |
needs: build | |
name: Publish API documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
path: source | |
- name: Checkout publish | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: publish | |
- name: Remove old API documentation | |
shell: bash | |
run: rm -rf "${GITHUB_REF_NAME}/api" | |
working-directory: publish | |
- name: Download JavaDoc | |
uses: actions/download-artifact@v4 | |
with: | |
name: java-doc | |
path: publish/${{ github.ref_name }}/api/java | |
- name: Download Node documentation | |
uses: actions/download-artifact@v4 | |
with: | |
name: node-doc | |
path: publish/${{ github.ref_name }}/api/node | |
- name: Publish | |
working-directory: publish | |
env: | |
USER_NAME: github-actions | |
USER_EMAIL: github-actions@github.com | |
COMMIT_REF: ${{ github.sha }} | |
run: ${{ github.workspace }}/source/.github/scripts/git_push_changes.sh | |
publish-node: | |
needs: build | |
name: Publish Node package | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: "https://registry.npmjs.org" | |
- name: Build | |
run: make build-node | |
- name: Publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: ${{ github.workspace }}/.github/scripts/npm_publish.sh unstable | |
working-directory: node | |
publish-java: | |
needs: build | |
name: Publish Java artifact to GitHub Packages | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: temurin | |
cache: maven | |
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
run: ${{ github.workspace }}/.github/scripts/maven_publish_snapshot.sh | |
working-directory: java |