From 26dd5802209e6857eeab1ef4784e0a9584af2324 Mon Sep 17 00:00:00 2001 From: s-hosoai Date: Wed, 19 Apr 2023 21:44:21 +0900 Subject: [PATCH] add release actions --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb1d5c6..aec6799 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,3 +27,29 @@ jobs: - name: Hakoniwa-core run: | bash build.bash + + - name: Artifact Name for ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + echo "ARTIFACT_NAME=libshakoc.so" >> $GITHUB_ENV + echo "ARTIFACT_PATH=cmake-build/src/hakoc/libshakoc.so" >> $GITHUB_ENV + + - name: Artifact Name for mac + if: matrix.os == 'macos-latest' + run: | + echo "ARTIFACT_NAME=libshakoc.dylib" >> $GITHUB_ENV + echo "ARTIFACT_PATH=cmake-build/src/hakoc/libshakoc.dylib" >> $GITHUB_ENV + + - name: upload Artifact + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/upload-artifact@v3 + with: + name: ${{env.ARTIFACT_NAME}} + path: ${{env.ARTIFACT_PATH}} + + - name: Publish archives and packages + if: startsWith(github.ref, 'refs/tags/v') + uses: softprops/action-gh-release@v1 + with: + files: | + ${{ env.ARTIFACT_PATH }}