From: qydysky Date: Sat, 2 Dec 2023 15:01:38 +0000 (+0800) Subject: Create main.yml X-Git-Tag: v0.0.20231202150522~2 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=3fc896435fb3b406d6ee806fb0b15f47ec9e2224;p=front%2F.git Create 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 }}