From 8f2e2736757ee065576840b932f6122d1b34f69d Mon Sep 17 00:00:00 2001 From: Qian Yun Date: Tue, 16 Aug 2022 21:07:54 +0800 Subject: [PATCH] test nightly release upload --- .github/workflows/linux.yml | 6 ++++++ .github/workflows/macOS.yml | 6 ++++++ .github/workflows/windows.yml | 8 +++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3ac980132..7e390a2e2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,3 +25,9 @@ jobs: with: name: FriCAS-linux-x86_64-binary path: FriCAS-linux-x86_64-${{ github.sha }}.tbz2 + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'oldk1331/fricas' }} + run: | + export OWNER_REPO=oldk1331/fricas + export RELEASE_ID=`curl https://api.github.com/repos/${OWNER_REPO}/releases/tags/nightly | jq .id` + curl -v -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.token }}" "https://uploads.github.com/repos/${OWNER_REPO}/releases/${RELEASE_ID}/assets?name=FriCAS-$(date +%Y-%m-%dT%H.%M)-linux-x86_64-$(echo ${{ github.sha }} | cut -c 1-8).tbz2" --data-binary "@FriCAS-linux-x86_64-${{ github.sha }}.tbz2" -H "Content-Type: application/x-bzip2" || true diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index b87fcdbdc..ee4e017f5 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -29,3 +29,9 @@ jobs: with: name: FriCAS-macOS-x86_64-binary path: FriCAS-macOS-x86_64-${{ github.sha }}.dmg + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'oldk1331/fricas' }} + run: | + export OWNER_REPO=oldk1331/fricas + export RELEASE_ID=`curl https://api.github.com/repos/${OWNER_REPO}/releases/tags/nightly | jq .id` + curl -v -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.token }}" "https://uploads.github.com/repos/${OWNER_REPO}/releases/${RELEASE_ID}/assets?name=FriCAS-$(date +%Y-%m-%dT%H.%M)-macOS-x86_64-$(echo ${{ github.sha }} | cut -c 1-8).dmg" --data-binary "@FriCAS-macOS-x86_64-${{ github.sha }}.dmg" -H "Content-Type: application/x-apple-diskimage" || true diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1a0fdfac3..15db8222c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: msys2/setup-msys2@v2 with: - install: make mingw-w64-x86_64-gcc mingw-w64-x86_64-gmp gmp-devel zip + install: make mingw-w64-x86_64-gcc mingw-w64-x86_64-gmp gmp-devel zip mingw-w64-x86_64-jq - name: download SBCL run: wget https://downloads.sourceforge.net/project/sbcl/sbcl/2.2.5/sbcl-2.2.5-x86-64-windows-binary.msi - name: install SBCL @@ -41,3 +41,9 @@ jobs: with: name: FriCAS-windows-x86_64-binary path: FriCAS-windows-x86_64-${{ github.sha }}.zip + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'oldk1331/fricas' }} + run: | + export OWNER_REPO=oldk1331/fricas + export RELEASE_ID=`curl https://api.github.com/repos/${OWNER_REPO}/releases/tags/nightly | jq .id` + curl -v -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.token }}" "https://uploads.github.com/repos/${OWNER_REPO}/releases/${RELEASE_ID}/assets?name=FriCAS-$(date +%Y-%m-%dT%H.%M)-windows-x86_64-$(echo ${{ github.sha }} | cut -c 1-8).zip" --data-binary "@FriCAS-windows-x86_64-${{ github.sha }}.zip" -H "Content-Type: application/zip" || true