From a5ba77db5b5063967351946e32fb767ddd09617a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Tue, 24 Oct 2023 19:51:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ VERSION | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 VERSION diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d64112f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +on: + + push: + branches: + - master + +name: Checkout and Create Release Version + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get version + id: get-version + run: | + version=$(cat VERSION) + echo "version=${version}" >> $GITHUB_OUTPUT + + - name: Create Tag + run: | + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git tag -a ${{ steps.get-version.outputs.version }} -m "Release Version ${{ steps.get-version.outputs.version }}" + git push origin ${{ steps.get-version.outputs.version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create Release + run: | + gh release create ${{ steps.get-version.outputs.version }} --notes "Release ${{ steps.get-version.outputs.version }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..60453e6 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +v1.0.0 \ No newline at end of file