diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bf35890..170cc268 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -# GitHub Actions Workflow created for testing and preparing the plugin release in following steps: +# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps: # - validate Gradle Wrapper, # - run 'test' and 'verifyPlugin' tasks, # - run Qodana inspections, @@ -64,14 +64,14 @@ jobs: VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')" CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - echo "::set-output name=version::$VERSION" - echo "::set-output name=name::$NAME" - echo "::set-output name=changelog::$CHANGELOG" - echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "name=$NAME" >> $GITHUB_OUTPUT + echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT + + echo "changelog<> $GITHUB_OUTPUT + echo "$CHANGELOG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier @@ -125,7 +125,7 @@ jobs: FILENAME=`ls *.zip` unzip "$FILENAME" -d content - echo "::set-output name=filename::${FILENAME:0:-4}" + echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT # Store already-built plugin as an artifact for downloading - name: Upload artifact @@ -149,7 +149,7 @@ jobs: - name: Fetch Sources uses: actions/checkout@v3 - # Remove old release drafts by using the curl request for the available releases with draft flag + # Remove old release drafts by using the curl request for the available releases with a draft flag - name: Remove Old Release Drafts env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -158,7 +158,7 @@ jobs: --jq '.[] | select(.draft == true) | .id' \ | xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} - # Create new release draft - which is not publicly visible and requires manual acceptance + # Create a new release draft which is not publicly visible and requires manual acceptance - name: Create Release Draft env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b91aab19..a0801b7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ name: Release on: release: - types: [prereleased, released] + types: [ prereleased, released ] workflow_dispatch: inputs: tagName: @@ -54,11 +54,9 @@ jobs: EOM )" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - - echo "::set-output name=changelog::$CHANGELOG" + echo "changelog<> $GITHUB_OUTPUT + echo "$CHANGELOG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT # Update Unreleased section with the current release note - name: Patch Changelog @@ -105,18 +103,18 @@ jobs: VERSION="${{ github.event.release.tag_name }}" BRANCH="changelog-update-$VERSION" LABEL="release changelog" - + git config user.email "action@github.com" git config user.name "GitHub Action" - + git checkout -b $BRANCH git commit -am "Changelog update - $VERSION" git push --set-upstream origin $BRANCH - + gh label create "$LABEL" \ --description "Pull requests with release changelog update" \ || true - + gh pr create \ --title "Changelog update - \`$VERSION\`" \ --body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \