Repository navigation
Windows CIジョブを追加し、vendor.zipにWindowsキットを同梱 #50
Workflow file for this run
This file contains hidden or 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: Publish Maven packages and Pages | |
| on: | |
| workflow_dispatch: | |
| push: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: publish-maven-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| publish: | |
| name: Publish to GitHub Packages and stage GitHub Pages | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Validate Gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Make scripts executable | |
| run: chmod +x ./gradlew ./scripts/extract_vendor.sh ./.github/scripts/publish-github-packages.sh | |
| - name: Extract vendor archives | |
| run: ./scripts/extract_vendor.sh | |
| env: | |
| VENDOR_PASSWORD: ${{ secrets.VENDOR_PASSWORD }} | |
| - name: Test | |
| run: ./gradlew test | |
| - name: Publish to GitHub Packages | |
| run: ./.github/scripts/publish-github-packages.sh | |
| env: | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Stage Maven repository for GitHub Pages | |
| if: github.ref_name == github.event.repository.default_branch | |
| run: ./gradlew publishAllPublicationsToStagingRepository | |
| - name: Add bootstrap scripts to GitHub Pages artifact | |
| if: github.ref_name == github.event.repository.default_branch | |
| run: | | |
| cp ./scripts/bootstrap.sh ./build/staging-maven-repository/bootstrap.sh | |
| cp ./scripts/bootstrap.ps1 ./build/staging-maven-repository/bootstrap.ps1 | |
| - name: Upload GitHub Pages artifact | |
| if: github.ref_name == github.event.repository.default_branch | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: build/staging-maven-repository | |
| deploy-pages: | |
| name: Deploy Maven repository to GitHub Pages | |
| if: github.ref_name == github.event.repository.default_branch | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| verify-template: | |
| name: Verify template builds | |
| needs: publish | |
| permissions: | |
| contents: read | |
| packages: read | |
| uses: ./.github/workflows/verify-template.yml | |
| with: | |
| ref: ${{ github.ref }} | |
| secrets: | |
| VENDOR_PASSWORD: ${{ secrets.VENDOR_PASSWORD }} | |
| GH_PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }} |