diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..3dd9251 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,38 @@ +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@v2 + with: + direction: upload + release-dir: artifacts + token: ${{secrets.PUSH_RELEASE_TOKEN}} # user:read, repository:write