👷 Add Release CI
This commit is contained in:
42
.github/workflows/Release.yml
vendored
Normal file
42
.github/workflows/Release.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build_release:
|
||||
name: build_release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: build
|
||||
run: tar -czvf minify_tf.tar.gz minify_tf
|
||||
shell: bash
|
||||
- name: version
|
||||
run: echo "::set-output name=version::$(./minify_tf version)"
|
||||
id: version
|
||||
- name: release
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
with:
|
||||
draft: false
|
||||
prerelease: false
|
||||
release_name: ${{ steps.version.outputs.version }}
|
||||
tag_name: ${{ github.ref }}
|
||||
body_path: CHANGELOG.md
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
- name: upload
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./minify_tf.tar.gz
|
||||
asset_name: minify_tf.tar.gz
|
||||
asset_content_type: application/x-gzip
|
||||
Reference in New Issue
Block a user