1
0
mirror of https://github.com/danog/ytop.git synced 2024-11-26 20:15:03 +01:00

Update release ci

This commit is contained in:
Caleb Bassi 2020-01-18 14:22:24 -08:00
parent adc1adc661
commit c558655aae
2 changed files with 33 additions and 7 deletions

21
.github/workflows/create-release.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Create Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: actions/create-release@v1.0.0
env:
# https://github.community/t5/GitHub-Actions/Github-Action-trigger-on-release-not-working-if-releases-was/td-p/34559
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

View File

@ -1,6 +1,9 @@
name: Publish Binaries
on: release
on:
release:
types:
- created
jobs:
publish:
@ -37,13 +40,15 @@ jobs:
command: build
args: --release --target=${{ matrix.target }}
- name: Archive and compress binary
- name: Package release
run: tar -czf ytop-${{ github.event.release.tag_name }}-${{ matrix.target }}.tar.gz -C ./target/${{ matrix.target }}/release/ ytop
- name: Upload archive to GitHub releases
uses: JasonEtco/upload-to-release@master
with:
args: ytop-${{ github.event.release.tag_name }}-${{ matrix.target }}.tar.gz application/zip
- name: Upload release asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ytop-${{ github.event.release.tag_name }}-${{ matrix.target }}.tar.gz
asset_name: ytop-${{ github.event.release.tag_name }}-${{ matrix.target }}.tar.gz
asset_content_type: application/zip