Release v0.218.1 (#1401) #100
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
name: release | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
goreleaser: | |
outputs: | |
artifacts: ${{ steps.releaser.outputs.artifacts }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.x | |
# Log into the GitHub Container Registry. The goreleaser action will create | |
# the docker images and push them to the GitHub Container Registry. | |
- uses: "docker/login-action@v3" | |
with: | |
registry: "ghcr.io" | |
username: "${{ github.actor }}" | |
password: "${{ secrets.GITHUB_TOKEN }}" | |
# QEMU is required to build cross platform docker images using buildx. | |
# It allows virtualization of the CPU architecture at the application level. | |
- name: Set up QEMU dependency | |
uses: docker/setup-qemu-action@v3 | |
- name: Run GoReleaser | |
id: releaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: latest | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
create-setup-cli-release-pr: | |
needs: goreleaser | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set VERSION variable from tag | |
run: | | |
VERSION=${{ github.ref_name }} | |
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV | |
- name: Update setup-cli | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.DECO_GITHUB_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: 'databricks', | |
repo: 'setup-cli', | |
workflow_id: 'release-pr.yml', | |
ref: 'main', | |
inputs: { | |
version: "${{ env.VERSION }}", | |
} | |
}); | |
create-homebrew-tap-release-pr: | |
needs: goreleaser | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set VERSION variable from tag | |
run: | | |
VERSION=${{ github.ref_name }} | |
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV | |
- name: Update homebrew-tap | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.DECO_GITHUB_TOKEN }} | |
script: | | |
let artifacts = ${{ needs.goreleaser.outputs.artifacts }} | |
artifacts = artifacts.filter(a => a.type == "Archive") | |
artifacts = new Map( | |
artifacts.map(a => [ | |
a.goos + "_" + a.goarch, | |
a.extra.Checksum.replace("sha256:", "") | |
]) | |
) | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: 'databricks', | |
repo: 'homebrew-tap', | |
workflow_id: 'release-pr.yml', | |
ref: 'main', | |
inputs: { | |
version: "${{ env.VERSION }}", | |
darwin_amd64_sha: artifacts.get('darwin_amd64'), | |
darwin_arm64_sha: artifacts.get('darwin_arm64'), | |
linux_amd64_sha: artifacts.get('linux_amd64'), | |
linux_arm64_sha: artifacts.get('linux_arm64') | |
} | |
}); | |
create-vscode-extension-update-pr: | |
needs: goreleaser | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set VERSION variable from tag | |
run: | | |
VERSION=${{ github.ref_name }} | |
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV | |
- name: Update CLI version in the VSCode extension | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.DECO_GITHUB_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: 'databricks', | |
repo: 'databricks-vscode', | |
workflow_id: 'update-cli-version.yml', | |
ref: 'main', | |
inputs: { | |
version: "${{ env.VERSION }}", | |
} | |
}); |