From 7cf7355f792accc050a8935ec6be037e8d12d908 Mon Sep 17 00:00:00 2001 From: Suguru Kato Date: Thu, 26 Dec 2019 14:07:23 +0900 Subject: [PATCH] :construction_worker: Add a new CI system for the automatic release --- .github/workflows/release.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 172a6d9cb..09d91a66f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: Create Release -on: [push] # TODO +on: + push: + tags: + - 'v*' jobs: build: @@ -20,6 +23,22 @@ jobs: - name: Archive codes into ecell4_base.tar.gz run: | tar -zcvf ecell4_base.tar.gz -X ecell4_base/exclude_files ecell4_base - - name: Test the archive is ok - run: | - ls -lh ecell4_base.tar.gz + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + - name: Upload the tarball + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./ecell4_base.tar.gz + asset_name: ecell4_base.tar.gz + asset_content_type: application/x-tar