mirror of https://github.com/databricks/cli.git
Publish snapshot binaries to snapshot release (#329)
## Changes Publish snapshot binaries to the snapshot release at https://github.com/databricks/bricks/releases/tag/snapshot. This means users have a stable URL to find snapshot builds instead of having to navigate to a particular action run. ## Tests Manually.
This commit is contained in:
parent
1fc903943d
commit
6ecf934719
|
@ -40,6 +40,9 @@ jobs:
|
|||
${{ steps.cache.outputs.GOCACHE }}
|
||||
key: release-${{ runner.os }}-go-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.sum', '.goreleaser.yaml') }}
|
||||
|
||||
- name: Hide snapshot tag to outsmart GoReleaser
|
||||
run: git tag -d snapshot || true
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
|
@ -51,18 +54,41 @@ jobs:
|
|||
with:
|
||||
name: bricks_darwin_snapshot
|
||||
path: |
|
||||
dist/bricks_darwin_*
|
||||
dist/bricks_darwin_*/
|
||||
|
||||
- name: Upload Linux binaries
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bricks_linux_snapshot
|
||||
path: |
|
||||
dist/bricks_linux_*
|
||||
dist/bricks_linux_*/
|
||||
|
||||
- name: Upload Windows binaries
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bricks_windows_snapshot
|
||||
path: |
|
||||
dist/bricks_windows_*
|
||||
dist/bricks_windows_*/
|
||||
|
||||
- name: Update snapshot tag
|
||||
|
||||
# Snapshot release may only be updated for commits to the main branch.
|
||||
# if: github.ref == 'refs/heads/main'
|
||||
|
||||
run: |
|
||||
git tag snapshot
|
||||
git push origin snapshot --force
|
||||
|
||||
- name: Update snapshot release
|
||||
|
||||
# Snapshot release may only be updated for commits to the main branch.
|
||||
# if: github.ref == 'refs/heads/main'
|
||||
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: Snapshot
|
||||
prerelease: true
|
||||
tag_name: snapshot
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: |
|
||||
dist/bricks*.zip
|
||||
|
|
|
@ -44,7 +44,13 @@ builds:
|
|||
binary: '{{ .ProjectName }}'
|
||||
archives:
|
||||
- format: zip
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||
|
||||
# Include version in archive only for release builds and not for snapshot builds.
|
||||
# Snapshot archives must have a stable file name such that the artifacts in the nightly
|
||||
# release are automatically overwritten. If the snapshot version is included in the
|
||||
# file name then additional logic to clean up older builds would be needed.
|
||||
name_template: '{{ .ProjectName }}_{{ if not .IsSnapshot }}{{ .Version }}_{{ end }}{{ .Os }}_{{ .Arch }}'
|
||||
|
||||
checksum:
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
||||
algorithm: sha256
|
||||
|
|
Loading…
Reference in New Issue