mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
59 lines
No EOL
1.9 KiB
YAML
59 lines
No EOL
1.9 KiB
YAML
name: CD
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
release-osx:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Get version
|
|
id: get_version
|
|
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
|
|
- name: Build
|
|
run: cargo build
|
|
- name: Run tests
|
|
run: make test
|
|
- name: Run clippy
|
|
run: make clippy
|
|
- name: Build Release
|
|
run: make build-release
|
|
|
|
- name: Set SHA
|
|
id: shasum
|
|
run: |
|
|
echo ::set-output name=sha::"$(shasum -a 256 ./target/gitui-mac.tar.gz | awk '{printf $1}')"
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: ${{ github.ref }}
|
|
draft: false
|
|
prerelease: true
|
|
|
|
- name: Upload Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
asset_path: ./target/gitui-mac.tar.gz
|
|
asset_name: gitui-mac.tar.gz
|
|
asset_content_type: application/gzip
|
|
|
|
- name: Bump Brew
|
|
env:
|
|
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.BREW_TOKEN }}
|
|
run: |
|
|
brew tap extrawurst/tap
|
|
brew bump-formula-pr -f --version=${{ steps.get_version.outputs.version }} --no-browse --no-audit \
|
|
--sha256=${{ steps.shasum.outputs.sha }} \
|
|
--url="https://github.com/extrawurst/gitui/releases/download/${{ steps.get_version.outputs.version }}/gitui-mac.tar.gz" \
|
|
extrawurst/tap/gitui |