Deploy to Maven #11
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: Deploy to Maven | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build | |
| uses: ./.github/workflows/ci.yml | |
| publish-to-r2: | |
| name: Publish to R2 | |
| needs: [build] | |
| runs-on: ubuntu-22.04 | |
| environment: main | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: Maven | |
| path: maven-repo | |
| - name: Deploy to R2 | |
| uses: ryand56/r2-upload-action@latest | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ secrets.R2_BUCKET_NAME }} | |
| source-dir: maven-repo | |
| destination-dir: ./ | |
| - name: Summary | |
| run: | | |
| echo "Deployed to R2 bucket at $(date)" | |
| echo "Maven repository URL: ${{ secrets.R2_PUBLIC_URL }}" |