ci: release deployment permission #20
Workflow file for this run
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: Build Snapshot | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
concurrency: | |
group: ${{ github.name }}-${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
checks: write # required for test-reporter | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/actions/build | |
test: | |
needs: [ build ] | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/actions/test | |
create-swift-package: | |
needs: [ build, test] | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/actions/createSwiftPackage | |
deploy-swift-package-snapshot: | |
needs: [create-swift-package] | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/actions/deploySwiftPackage | |
with: | |
branch: "develop" | |
deploy-snapshot: | |
needs: [ test ] | |
if: github.ref == 'refs/heads/develop' | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/actions/prepare | |
- name: Setup git-mkver | |
uses: cperezabo/[email protected] | |
with: | |
version: "1.3.0" | |
- name: Generate version | |
run: | | |
export VERSION=$(git mkver next --pre-release) | |
echo $VERSION | |
echo "VERSION=$VERSION" >> "$GITHUB_ENV" | |
- name: Publish | |
run: ./gradlew publishAllPublicationsToSonatypeRepository -Pversion=$VERSION --max-workers 1 | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} |