mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-22 02:12:58 +03:00
Add linux release step
This commit is contained in:
parent
5820cc246c
commit
2b4f80b141
37
.github/workflows/cd.yml
vendored
37
.github/workflows/cd.yml
vendored
@ -6,8 +6,12 @@ on:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
release-osx:
|
||||
runs-on: macos-latest
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
rust: [stable]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get version
|
||||
@ -19,13 +23,19 @@ jobs:
|
||||
run: make test
|
||||
- name: Run clippy
|
||||
run: make clippy
|
||||
- name: Build Release
|
||||
run: make build-release
|
||||
|
||||
- name: Build Release Mac
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: make release-mac
|
||||
- name: Build Release Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: make release-linux
|
||||
|
||||
- name: Set SHA
|
||||
if: matrix.os == 'macos-latest'
|
||||
id: shasum
|
||||
run: |
|
||||
echo ::set-output name=sha::"$(shasum -a 256 ./target/gitui-mac.tar.gz | awk '{printf $1}')"
|
||||
echo ::set-output name=sha::"$(shasum -a 256 ./release/gitui-mac.tar.gz | awk '{printf $1}')"
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
@ -39,16 +49,29 @@ jobs:
|
||||
prerelease: true
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: matrix.os == 'macos-latest'
|
||||
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
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./release/gitui-mac.tar.gz
|
||||
asset_name: gitui-mac.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./release/gitui-linux.tar.gz
|
||||
asset_name: gitui-linux.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Bump Brew
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.BREW_TOKEN }}
|
||||
run: |
|
||||
|
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -13,17 +13,20 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
rust: [stable]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
- name: Build Debug
|
||||
run: cargo build
|
||||
- name: Run tests
|
||||
run: make test
|
||||
- name: Run clippy
|
||||
run: make clippy
|
||||
- name: Build Release
|
||||
run: make build-release
|
||||
- name: Security audit
|
||||
uses: actions-rs/audit-check@v1
|
||||
with:
|
||||
|
13
Makefile
13
Makefile
@ -6,11 +6,16 @@ debug:
|
||||
|
||||
build-release:
|
||||
cargo build --release
|
||||
|
||||
release-mac: build-release
|
||||
strip target/release/gitui
|
||||
ls -lisah target/release/gitui
|
||||
tar -C ./target/release/ -czvf ./target/gitui-mac.tar.gz ./gitui
|
||||
ls -lisah ./target/gitui-mac.tar.gz
|
||||
shasum -a 256 ./target/gitui-mac.tar.gz | awk '{printf $1}'
|
||||
mkdir -p release
|
||||
tar -C ./target/release/ -czvf ./release/gitui-mac.tar.gz ./gitui
|
||||
|
||||
release-linux: build-release
|
||||
strip target/release/gitui
|
||||
mkdir -p release
|
||||
tar -C ./target/release/ -czvf ./release/gitui-linux.tar.gz ./gitui
|
||||
|
||||
test:
|
||||
cargo test --workspace
|
||||
|
Loading…
Reference in New Issue
Block a user