Snapshot run 27 #27
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: snapshot | |
run-name: Snapshot run ${{ github.run_number }} | |
on: | |
workflow_dispatch: | |
jobs: | |
validate: | |
name: Validate | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
checks: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# we need the full history to validate license headers | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 # Does also set up Maven and GPG | |
with: | |
java-package: 'jdk' | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
check-latest: true | |
- name: Validate license headers | |
run: mvn -U -B license:check -P sxda.build.license-validation | |
publish-maven: | |
runs-on: ubuntu-latest | |
needs: validate | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
server-id: github | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: true | |
- name: Publish maven modules to GitHub Packages | |
run: mvn -B deploy | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
publish-npm: | |
runs-on: ubuntu-latest | |
needs: validate | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: true | |
- name: Update npm module snapshot version | |
run: npm run version:snapshot | |
working-directory: ./ace | |
- name: Build npm module | |
run: npm run build:all | |
working-directory: ./ace | |
- name: Publish node packages to npmjs.com | |
run: npm publish --access public --tag snapshot | |
working-directory: ./ace | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
pages: | |
needs: validate | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: true | |
- name: Update npm module snapshot version | |
run: npm run version:snapshot | |
working-directory: ./demo | |
- name: Build npm module | |
run: npm run build:all | |
working-directory: ./demo | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './demo/dist/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |