diff --git a/.github/workflows/create-release-draft.yml b/.github/workflows/create-release-draft.yml index 6b51226c..55fefce9 100644 --- a/.github/workflows/create-release-draft.yml +++ b/.github/workflows/create-release-draft.yml @@ -16,12 +16,10 @@ jobs: uses: actions/checkout@v3 - name: Get release info - id: get_release_info run: | APP_VERSION=$(sed -n "s/\(.*\)<\/version>/\\1/p" ./appinfo/info.xml | tr -d '\t') IS_NIGHTLY=$(if [[ $APP_VERSION == *"beta"* ]]; then echo "true"; else echo "false"; fi) - echo "::set-output name=version::v${APP_VERSION}" - echo "::set-output name=tag::v${APP_VERSION}" + echo RELEASE_TAG="v$APP_VERSION" >> $GITHUB_ENV CHANGELOG=$(grep -oPz "(?s)##\s\[$APP_VERSION\s.+?(?=##\s\[|$)" ./CHANGELOG.md | tr -d '\0' | sed /^$/d | sed '1d') CHANGELOG=$(echo "$CHANGELOG" | sed '$!N;s/^###.*\n#/#/;P;D' | sed '$!N;s/^###.*\n#/#/;P;D' | sed '${/^###/d;}') if [ "$CHANGELOG" == "" ]; then @@ -97,8 +95,8 @@ jobs: - name: Create release draft uses: ncipollo/release-action@v1.12.0 with: - name: ${{ steps.get_release_info.outputs.version }} - tag: ${{ steps.get_release_info.outputs.tag }} + name: ${{ env.RELEASE_TAG }} + tag: ${{ env.RELEASE_TAG }} prerelease: ${{ env.IS_NIGHTLY }} commit: ${{ github.ref }} draft: true diff --git a/.github/workflows/publish-appstore.yml b/.github/workflows/publish-appstore.yml index 1d0b53b8..6db293fc 100644 --- a/.github/workflows/publish-appstore.yml +++ b/.github/workflows/publish-appstore.yml @@ -14,13 +14,11 @@ jobs: uses: actions/checkout@v3 - name: Get release url - id: release_url run: | APP_VERSION=$(sed -n "s/\(.*\)<\/version>/\\1/p" ./appinfo/info.xml | tr -d '\t') IS_NIGHTLY=$(if [[ $APP_VERSION == *"beta"* ]]; then echo "true"; else echo "false"; fi) REP_NAME=${{github.repository_owner}} RELEASE_URL=https://github.com/$REP_NAME/$APP_NAME/releases/download/v$APP_VERSION/$APP_NAME.tar.gz - echo "::set-output name=url::${RELEASE_URL}" curl -f --output app.tar.gz -L $RELEASE_URL echo "RELEASE_URL=$RELEASE_URL" >> $GITHUB_ENV echo "IS_NIGHTLY=$IS_NIGHTLY" >> $GITHUB_ENV