mirror of
https://github.com/FelixKratz/SketchyBar
synced 2025-02-18 05:28:31 +00:00
parent
ee4bac9dc1
commit
d47f941fa0
1 changed files with 19 additions and 13 deletions
32
.github/workflows/build-and-release.yaml
vendored
32
.github/workflows/build-and-release.yaml
vendored
|
@ -5,6 +5,7 @@ on:
|
||||||
branches: []
|
branches: []
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
- "testing"
|
||||||
paths:
|
paths:
|
||||||
- 'src/**'
|
- 'src/**'
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
|
@ -38,9 +39,6 @@ jobs:
|
||||||
id: build-bin
|
id: build-bin
|
||||||
run: |
|
run: |
|
||||||
make all
|
make all
|
||||||
echo "::set-output name=file::./bin/spacebar"
|
|
||||||
echo "::set-output name=name::spacebar"
|
|
||||||
echo "::set-output name=sha::$(shasum -a 256 ./bin/spacebar | cut -d" " -f1)"
|
|
||||||
|
|
||||||
- name: Check execution & get version
|
- name: Check execution & get version
|
||||||
id: check-bin
|
id: check-bin
|
||||||
|
@ -57,28 +55,36 @@ jobs:
|
||||||
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Check bin version before release
|
- name: Check bin version before release
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/testing') }}
|
||||||
run: |
|
run: |
|
||||||
[[ "$RELEASE_VERSION" == ${{ steps.check-bin.outputs.version }} ]]
|
[[ "$RELEASE_VERSION" == ${{ steps.check-bin.outputs.version }} ]]
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create release archive
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
id: archive
|
||||||
|
run: |
|
||||||
|
tar czvf spacebar-$RELEASE_VERSION.tar.gz bin/spacebar doc examples
|
||||||
|
echo "::set-output name=file::spacebar-$RELEASE_VERSION.tar.gz"
|
||||||
|
echo "::set-output name=sha::$(shasum -a 256 spacebar-$RELEASE_VERSION.tar.gz | cut -d" " -f1)"
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
id: create-release
|
id: create-release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
draft: false
|
draft: ${{ startsWith(github.ref, 'refs/tags/testing') }}
|
||||||
tag_name: ${{ github.ref }}
|
tag_name: ${{ github.ref }}
|
||||||
release_name: ${{ env.RELEASE_VERSION }}
|
release_name: ${{ env.RELEASE_VERSION }}
|
||||||
body: |
|
body: |
|
||||||
[Changelog](https://github.com/cmacrae/spacebar/blob/master/CHANGELOG.md)
|
[Changelog](https://github.com/cmacrae/spacebar/blob/master/CHANGELOG.md)
|
||||||
|
|
||||||
You can find a precompiled binary in the release assets below.
|
You can find a precompiled release tarball in the release assets below.
|
||||||
SHA-256 checksum:
|
SHA-256 checksum:
|
||||||
`${{ steps.build-bin.outputs.sha }}`
|
`${{ steps.archive.outputs.sha }}`
|
||||||
|
|
||||||
- name: Upload Release Asset
|
- name: Upload release archive
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
id: upload-release-asset
|
id: upload-release-asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
@ -86,6 +92,6 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||||
asset_path: ${{ steps.build-bin.outputs.file }}
|
asset_path: ${{ steps.archive.outputs.file }}
|
||||||
asset_name: ${{ steps.build-bin.outputs.name }}
|
asset_name: ${{ steps.archive.outputs.file }}
|
||||||
asset_content_type: application/x-binary
|
asset_content_type: application/gzip
|
||||||
|
|
Loading…
Add table
Reference in a new issue