From 22f0b0fc9dcb9d4016dd819d0dee60e6eee9a219 Mon Sep 17 00:00:00 2001 From: k3y0708 Date: Mon, 8 May 2023 19:56:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20Release=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/Release.yml diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..b647e77 --- /dev/null +++ b/.github/workflows/Release.yml @@ -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