From a760d5fa28cc5027f94e354a19f17944f58265e6 Mon Sep 17 00:00:00 2001 From: hangpersonal Date: Tue, 26 Aug 2025 21:40:52 -0700 Subject: [PATCH] Add release.yml --- .gitea/workflows/release.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..20cd291 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release Workflow + +on: + # The workflow only runs with push a Git tag + push: + tags: + - "v*.*.*" # v1.0.0, v2.5.3, v10.23.7 + +jobs: + # Defines a job named release + release: + # According to the Gitea documentation, the ubuntu-latest label is mapped + # internally to Ubuntu 22.04 environments + runs-on: ubuntu-latest + steps: + - name: Checkout code + # Pulls your repo into the runner so it has access to the source code + uses: actions/checkout@v3 + + - name: Build artifact + # Makes a directory dist/ + # Creates a file README.txt inside dist/ + # $GITHUB_REF_NAME is an environment variable set by Actions - + # it will be the name of the Git tag that triggered this workflow + # If you pushed v1.2.3, the file will contain "Release version v1.2.3" + # run, execute these shell commands + # |, treat everything indented below this as a multi-line string, + # and keep line breaks as they are. + # /workspace///dist/ + run: | + mkdir dist + echo "Release version $GITHUB_REF_NAME" > dist/README.txt + echo "Ref $GITHUB_REF" >> dist/README.txt + + - name: Upload artifact + # Packages whatever is inside dist/ (in this case, just the README.txt) + # Uploads it to Gitea Actions as a downloadable artifact + # In the Actions UI, after the run finishes, a link to download release-files.zip + uses: actions/upload-artifact@v3 + with: + name: release-files + path: dist/