Merge pull request #129 from openfga/dependabot/gradle/dependencies-f… #8
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
| # https://github.com/JetBrains/intellij-platform-plugin-template/blob/main/.github/workflows/release.yml | |
| name: Publish Plugin | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| jobs: | |
| test: | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/main.yaml | |
| # First create the release so that we have somewhere to upload the distribution zips to | |
| create-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create Release | |
| uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1 | |
| with: | |
| version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ | |
| changelog_file: CHANGELOG.md | |
| create_draft: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish: | |
| needs: [test, create-release] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | |
| with: | |
| gradle-home-cache-cleanup: true | |
| # Publish the plugin to JetBrains Marketplace | |
| - name: Publish Plugin | |
| env: | |
| PUBLISH_TOKEN: ${{ secrets.JETBRAINS_API_TOKEN }} | |
| CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} | |
| PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} | |
| PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} | |
| run: ./gradlew publishPlugin | |
| # Upload artifact as a release asset and move out of draft | |
| - name: Upload Release Asset | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| gh release upload "${{ env.TAG_NAME }}" ./build/distributions/* | |
| gh release edit "${{ env.TAG_NAME }}" --draft=false | |