From aa266fe4dfc8265c2b4bcb6a2b4a0e9e466d415e Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 4 Dec 2025 21:46:32 +0000 Subject: [PATCH] Add release workflow --- .gitea/workflows/release.yaml | 34 ++++++++++++++++++++++++++++++++++ README.md | 6 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/release.yaml diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..1af897e --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Generate Release + +run-name: Release_Generator +on: + push: + branches: + - main + +jobs: + validate_and_release: + runs-on: ubuntu-latest + steps: + - name: Check out Repo code + uses: actions/checkout@v3 + + - name: Validate XML + run: | + sudo apt-get update && sudo apt-get install -y libxml2-utils + xmllint --noout --valid knowledgebase.xml + + - name: Get current timestamp + id: timestamp + run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M%S')" + + - name: Create Release + if: success() + uses: akkuman/gitea-release-action@v1 + env: + NODE_OPTIONS: '--experimental-fetch' + with: + body: Automatic release after changes + tag_name: ${{ steps.timestamp.outputs.date }} + name: ${{ steps.timestamp.outputs.date }} + token: ${{ secrets.OWLBOT_KEY }} diff --git a/README.md b/README.md index b52fdbf..9cabf61 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,8 @@ LDBSVWS (or the public version) to reduce API requests that will return no data Only a subset of the information included in the knowledgebase -is included for these locations \ No newline at end of file +is included for these locations + +## Releases + +Upon a push to main, the XML will be validated, and if all is good, a release produced. \ No newline at end of file