add build and release workflows

This commit is contained in:
leetcode-mafia
2023-04-26 14:44:56 -04:00
parent b4027f260d
commit 5a770e059d
3 changed files with 104 additions and 10 deletions

32
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Release
on:
push:
tags:
- 'v*.*'
- 'v*.*.*'
jobs:
build:
uses: ./.github/workflows/build.yml
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: Cheetah
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Cheetah.zip
asset_name: Cheetah.zip
asset_content_type: application/zip