test(e2e): defeat template-filter pollution in the bundle_init wizard… #905
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: Create Draft Release | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| jobs: | |
| create-build-artifacts: | |
| if: startsWith(github.event.head_commit.message, 'Release:') || github.event_name == 'workflow_dispatch' | |
| uses: ./.github/workflows/create-build-artifacts.yml | |
| secrets: inherit | |
| create-release: | |
| if: startsWith(github.event.head_commit.message, 'Release:') || github.event_name == 'workflow_dispatch' | |
| needs: ["create-build-artifacts"] | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: linux-ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| id: download | |
| with: | |
| path: build | |
| - run: ls -lr ${{ steps.download.outputs.download-path }} | |
| - run: | | |
| TITLE=$(git show -s --format=%B HEAD | head -n1) | |
| CHANGELOG_FILE=packages/databricks-vscode/CHANGELOG.md | |
| RELEASE_VERSION=$(cat $CHANGELOG_FILE | grep -E "^# Release: v(([0-9]+\.){2}[0-9]+).*" | head -n1 | sed -nr 's/.*Release: v(([0-9]+\.){2}[0-9]+).*/\1/p') | |
| tmpfile=$(mktemp /tmp/commit-message.XXXXX) | |
| cat $CHANGELOG_FILE | awk 'BEGIN{C=0} $0 ~ /^# Release: v.*/ && C==1{C=2} $0 ~ /^# Release: v'"$RELEASE_VERSION"'.*/{C=1} C==1 {print $0}' > $tmpfile | |
| cat $tmpfile >> $GITHUB_STEP_SUMMARY | |
| gh release create release-v$RELEASE_VERSION ${{ steps.download.outputs.download-path }}/databricks*/*.vsix \ | |
| -d --target main -t "$TITLE" -F $tmpfile | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |