mirror of
https://github.com/danog/ytop.git
synced 2024-11-30 04:29:10 +01:00
Update release ci
This commit is contained in:
parent
adc1adc661
commit
c558655aae
21
.github/workflows/create-release.yml
vendored
Normal file
21
.github/workflows/create-release.yml
vendored
Normal 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
|
19
.github/workflows/publish-binaries.yml
vendored
19
.github/workflows/publish-binaries.yml
vendored
@ -1,6 +1,9 @@
|
|||||||
name: Publish Binaries
|
name: Publish Binaries
|
||||||
|
|
||||||
on: release
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
@ -37,13 +40,15 @@ jobs:
|
|||||||
command: build
|
command: build
|
||||||
args: --release --target=${{ matrix.target }}
|
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
|
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
|
- name: Upload release asset
|
||||||
uses: JasonEtco/upload-to-release@master
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
with:
|
|
||||||
args: ytop-${{ github.event.release.tag_name }}-${{ matrix.target }}.tar.gz application/zip
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user