From df5b630a18f02ac2d3caa41e817d489c9ea4b094 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Thu, 13 Mar 2025 15:54:18 +0300 Subject: [PATCH] [#25] ci: Publish release artifacts automatically Signed-off-by: Vitaliy Potyarkin --- .forgejo/workflows/build.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .forgejo/workflows/build.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..564a45a --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,37 @@ +name: build +on: + pull_request: + push: + workflow_dispatch: + +jobs: + build: + name: locode + runs-on: docker + container: node:22-bookworm + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: '1.23' + check-latest: true + + - name: Build LOCODE database + run: |- + make all + mkdir -p artifacts + mv -v frostfs-locode-db artifacts/ + gzip --stdout --best locode_db > artifacts/locode_db.gz + + - name: Publish release + if: >- + startsWith(github.ref, 'refs/tags/v') && + (github.event_name == 'workflow_dispatch' || github.event_name == 'push') + uses: actions/release + with: + direction: upload + release-dir: artifacts