Tag Release #28
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: Tag Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag name for the release (e.g. v23.0.1)' | |
| required: true | |
| type: string | |
| prerelease: | |
| description: 'Mark as pre-release' | |
| required: false | |
| type: boolean | |
| default: true | |
| make_latest: | |
| description: 'Mark as latest release' | |
| required: false | |
| type: choice | |
| options: | |
| - 'true' | |
| - 'false' | |
| - 'legacy' | |
| default: 'true' | |
| skip_tests: | |
| description: 'Skip test-and-verify (e.g. tests already passed on this commit)' | |
| required: false | |
| type: boolean | |
| default: false | |
| jobs: | |
| test-and-verify: | |
| if: ${{ !inputs.skip_tests }} | |
| uses: ./.github/workflows/shared-test.yml | |
| with: | |
| elixir-version: '1.13.4' | |
| otp-version: '24.3.4.6' | |
| release: | |
| needs: [ test-and-verify ] | |
| if: ${{ always() && (needs.test-and-verify.result == 'success' || needs.test-and-verify.result == 'skipped') }} | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Build Environment | |
| id: setup-env | |
| uses: ./.github/actions/setup-env | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| skip-searchable-options: 'false' | |
| - name: Build with Gradle (canary) | |
| id: build-plugin-canary | |
| if: ${{ inputs.prerelease }} | |
| run: ./gradlew buildPlugin --no-scan -PpublishChannels=canary --stacktrace | |
| - name: Build with Gradle (release) | |
| id: build-plugin-default | |
| if: ${{ !inputs.prerelease }} | |
| run: ./gradlew buildPlugin --no-scan -PpublishChannels=default --stacktrace | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 | |
| with: | |
| tag_name: ${{ inputs.tag }} | |
| target_commitish: ${{ github.sha }} | |
| name: ${{ inputs.tag }} | |
| prerelease: ${{ inputs.prerelease }} | |
| make_latest: ${{ inputs.make_latest }} | |
| files: build/distributions/intellij-elixir-*.zip | |
| fail_on_unmatched_files: true |