]> 127.0.0.1 Git - front/.git/commitdiff
Create main.yml
authorqydysky <qydysky@foxmail.com>
Sat, 2 Dec 2023 15:01:38 +0000 (23:01 +0800)
committerGitHub <noreply@github.com>
Sat, 2 Dec 2023 15:01:38 +0000 (23:01 +0800)
.github/workflows/main.yml [new file with mode: 0644]

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644 (file)
index 0000000..ce577b3
--- /dev/null
@@ -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 }}