From 3fc896435fb3b406d6ee806fb0b15f47ec9e2224 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sat, 2 Dec 2023 23:01:38 +0800 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ce577b3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Set Release Name + run: | + echo "TIME=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_ENV + echo "HASH=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV + + - name: Upload a Release Asset + uses: softprops/action-gh-release@v1 + with: + tag_name: v0.0.${{ env.TIME }} -- 2.39.2