Skip to content

Commit 2047b59

Browse files
author
Stephan Dilly
committed
cd pipeline
1 parent 75d010c commit 2047b59

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

.github/workflows/cd.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
# push:
7+
# tags:
8+
# - '*'
9+
10+
jobs:
11+
release-osx:
12+
runs-on: macos-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
# - name: Build
16+
# run: cargo build
17+
# - name: Run tests
18+
# run: make test
19+
# - name: Run clippy
20+
# run: make clippy
21+
- name: Build Release
22+
run: make build-release
23+
24+
- name: Create Release
25+
id: create_release
26+
uses: actions/create-release@v1
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
with:
30+
tag_name: ${{ github.ref }}
31+
release_name: Release ${{ github.ref }}
32+
draft: false
33+
prerelease: true
34+
35+
- name: Set SHA
36+
id: shasum
37+
run: |
38+
echo ::set-output name=sha::"$(shasum -a 256 ./target/gitui-mac.tar.gz | awk '{printf $1}')"
39+
40+
- name: Upload Release Asset
41+
uses: actions/upload-release-asset@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
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
46+
asset_path: ./target/gitui-mac.tar.gz
47+
asset_name: gitui-mac.tar.gz
48+
asset_content_type: application/gzip
49+
50+
- name: Bump Brew
51+
env:
52+
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.BREW_TOKEN }}
53+
run: |
54+
brew tap extrawurst/tap
55+
brew bump-formula-pr -f --version=v0.2.0 --no-browse --no-audit \
56+
--sha256=${{ steps.shasum.outputs.sha }} \
57+
--url="https://github.com/extrawurst/gitui/releases/download/refs%2Fheads%2Fcd-pipeline/gitui-mac.tar.gz" \
58+
extrawurst/tap/gitui

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- name: Build
2222
run: cargo build
2323
- name: Run tests
24-
run: cargo test --workspace
24+
run: make test
2525
- name: Run clippy
26-
run: cargo clean && cargo clippy --all-features
26+
run: make clippy
2727
- name: Security audit
2828
uses: actions-rs/audit-check@v1
2929
with:

0 commit comments

Comments
 (0)