fix(some): test semantic release #2
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
# GitHub Actions Workflow created for handling the release process based on the draft release prepared with the Build workflow. | |
# Running the publishPlugin task requires all following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN. | |
# See https://plugins.jetbrains.com/docs/intellij/plugin-signing.html for more information. | |
name: Intellij Release | |
on: | |
push: | |
tags: | |
- intellij-v* | |
# paths: | |
# - 'ide_extension/intellij/**' | |
jobs: | |
# Prepare and publish the plugin to JetBrains Marketplace repository | |
release: | |
name: Publish Plugin | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
# Generate a token of Github APP | |
- name: Generate a token | |
id: generate_token | |
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
with: | |
app_id: ${{ secrets.APP_ID_ADMIN_GITHUB }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY_ADMIN_GITHUB }} | |
# Check out the current repository | |
- name: Fetch Sources | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
ref: ${{ github.event.release.tag_name }} | |
# Set up Java environment for the next steps | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 17 | |
# Setup Gradle | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-home-cache-cleanup: true | |
# Set environment variables | |
- name: Export Properties | |
id: properties | |
shell: bash | |
run: | | |
CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d' | |
${{ github.event.release.body }} | |
EOM | |
)" | |
echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
echo "$CHANGELOG" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
# # Update the Unreleased section with the current release note | |
# - name: Patch Changelog | |
# if: ${{ steps.properties.outputs.changelog != '' }} | |
# env: | |
# CHANGELOG: ${{ steps.properties.outputs.changelog }} | |
# run: | | |
# ./gradlew patchChangelog --release-note="$CHANGELOG" | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/intellij-v}" >> $GITHUB_ENV | |
- name: Upgrade Gradle.properties | |
run: sed -i 's/pluginVersion=.*/pluginVersion=${{ env.RELEASE_VERSION }}/g' gradle.properties | |
working-directory: ./ide_extension/intellij | |
# Generate changelog | |
- name: Generate Changelog | |
uses: heinrichreimer/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
pullRequests: true | |
prWoLabels: true | |
issues: true | |
issuesWoLabels: true | |
stripGeneratorNotice: true | |
base: './ide_extension/intellij' | |
excludeTagsRegex: '^(?!.*\bintellij\b).*' | |
- name: Save version | |
uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa # v2.9 | |
with: | |
github-token: ${{ steps.generate_token.outputs.token }} | |
push-branch: "feature/ide-plugin-intellj" | |
commit-message: 'upgrade version to ${{ env.RELEASE_VERSION }} version [skip ci]' | |
force-add: "true" | |
force-push: "true" | |
files: ide_extension/intellij/CHANGELOG.md ide_extension/intellij/gradle.properties | |
name: Release Bot | |
email: [email protected] | |
# Publish the plugin to JetBrains Marketplace | |
# - name: Publish Plugin | |
# env: | |
# PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
# CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }} | |
# PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
# PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }} | |
# run: ./gradlew publishPlugin |