2022-05-13 15:43:54 +00:00
|
|
|
name: release
|
2022-12-22 09:25:24 +00:00
|
|
|
|
2022-05-13 15:43:54 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*"
|
2022-12-22 09:25:24 +00:00
|
|
|
|
2022-09-08 12:13:43 +00:00
|
|
|
workflow_dispatch:
|
2022-12-22 09:25:24 +00:00
|
|
|
|
2022-05-13 15:43:54 +00:00
|
|
|
jobs:
|
|
|
|
goreleaser:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-09-08 13:12:26 +00:00
|
|
|
- name: Checkout repository and submodules
|
2023-09-05 08:27:18 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-12-12 15:51:27 +00:00
|
|
|
|
2022-05-13 15:43:54 +00:00
|
|
|
- name: Unshallow
|
|
|
|
run: git fetch --prune --unshallow
|
2022-12-12 15:51:27 +00:00
|
|
|
|
2022-09-08 09:21:00 +00:00
|
|
|
- name: Setup Go
|
2023-08-30 14:57:34 +00:00
|
|
|
uses: actions/setup-go@v4
|
2022-05-13 15:43:54 +00:00
|
|
|
with:
|
2023-08-15 13:50:40 +00:00
|
|
|
go-version: 1.21.0
|
2022-12-22 09:25:24 +00:00
|
|
|
|
2022-05-13 15:43:54 +00:00
|
|
|
- name: Run GoReleaser
|
2022-12-22 10:01:50 +00:00
|
|
|
uses: goreleaser/goreleaser-action@v4
|
2022-05-13 15:43:54 +00:00
|
|
|
with:
|
|
|
|
version: latest
|
2023-04-20 09:59:34 +00:00
|
|
|
args: release
|
2022-05-13 15:43:54 +00:00
|
|
|
env:
|
2022-09-08 12:13:43 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-10-04 14:03:37 +00:00
|
|
|
|
|
|
|
create-release-prs:
|
|
|
|
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 }}",
|
|
|
|
}
|
|
|
|
});
|