release_event #10
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
on: | |
repository_dispatch: | |
types: [release_event] | |
jobs: | |
update-scorpio-version-with-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Extract release version from webhook | |
id: extract_release_version | |
run: | | |
RELEASE_VERSION=$(echo ${{ github.event.client_payload.version }}) | |
echo "Release version: $RELEASE_VERSION" | |
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV | |
- name: Replace number in file with release version | |
run: | | |
FILE_PATH="images/base-ide/package.json" | |
OLD_VERSION=$(grep -oP '(?<=https://open-vsx.org/api/tum-aet/artemis-scorpio/)[0-9]+\.[0-9]+\.[0-9]+' $FILE_PATH) | |
sed -i "s|https://open-vsx.org/api/tum-aet/artemis-scorpio/${OLD_VERSION}/file/tum-aet.artemis-scorpio-${OLD_VERSION}.vsix|https://open-vsx.org/api/tum-aet/artemis-scorpio/${{ env.RELEASE_VERSION }}/file/tum-aet.artemis-scorpio-${{ env.RELEASE_VERSION }}.vsix|g" $FILE_PATH | |
cat $FILE_PATH | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: update-scorpio-release-version-${{ env.RELEASE_VERSION }} | |
delete-branch: true | |
commit-message: "Update scorpio with release version ${{ env.RELEASE_VERSION }}" | |
title: "Update scorpio with release version ${{ env.RELEASE_VERSION }}" | |
body: "This PR updates the verion of the scorpio plugin to the new release version ${{ env.RELEASE_VERSION }}." | |
reviewers: Mtze | |
team-reviewers: artemis-maintainers |