summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-09 00:25:49 +0800
committerruki <[email protected]>2021-01-09 00:25:49 +0800
commitaa456e5f5da86bef9c5739367a92b9f1d6bc05a6 (patch)
tree24a534f7242767fb9a0d7bbfec53fc84122b8048
parent9a0803d492a81d385694dbe205fc1f0af65035ac (diff)
update dev/master artifact to releases
-rw-r--r--.github/workflows/windows.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index a93e74183..dd3ed1298 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -17,6 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
+ fetch-depth: 0
submodules: true
- uses: xmake-io/github-action-setup-xmake@v1
with:
@@ -138,6 +139,24 @@ jobs:
name: xmake-latest.${{ env.RELEASE_NAME }}.sha256
path: artifacts/${{env.RELEASE_NAME}}/shafile
+ # upload artifacts to latest release
+ - name: Inject slug/short variables
+ uses: rlespinasse/[email protected]
+
+ - name: Get Previous tag
+ id: previoustag
+ uses: WyriHaximus/github-action-get-previous-tag@master
+
+ - name: Upload artifacts to lastest release
+ if: ${{ env.GITHUB_REF_SLUG }} == 'dev' || ${{ env.GITHUB_REF_SLUG }} == 'master'
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: artifacts/${{env.RELEASE_NAME}}/xmake.exe
+ asset_name: xmake-${{ env.GITHUB_REF_SLUG }}.${{ env.RELEASE_NAME }}.exe
+ tag: ${{ steps.previoustag.outputs.tag }}
+ overwrite: true
+
# publish release
- name: publish
if: github.event.action == 'published'