👷 Add Release CI

This commit is contained in:
2023-05-08 19:56:27 +02:00
parent 40c9474129
commit 22f0b0fc9d

42
.github/workflows/Release.yml vendored Normal file
View 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