[#25] ci: Publish release artifacts automatically
All checks were successful
DCO check / DCO (pull_request) Successful in 25s
build / locode (pull_request) Successful in 30s
build / locode (push) Successful in 40s

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
Vitaliy Potyarkin 2025-03-13 15:54:18 +03:00
parent 1a38db8a2b
commit 4cb1f84fa8

View file

@ -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