Skip to content

Set better artifact name #37

Set better artifact name

Set better artifact name #37

---
name: Packages
on:
pull_request:
types:
- unlabeled # if GitHub Actions stuck, add and remove "not ready" label to force rebuild
- opened
- reopened
- synchronize
push:
branches:
- ferretdb
tags:
- "*"
schedule:
- cron: "10 8 * * 1"
env:
GOPATH: /home/runner/go
GOCACHE: /home/runner/go/cache
GOLANGCI_LINT_CACHE: /home/runner/go/cache/lint
GOMODCACHE: /home/runner/go/mod
GOPROXY: https://proxy.golang.org
GOTOOLCHAIN: local
# Do not run this workflow in parallel for any PR change or branch/tag push
# to save some resources.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: false
jobs:
build:
name: Build .debs (${{ matrix.os }}, Pg${{ matrix.pg }})
# runs-on: ubuntu-24.04
runs-on: ubicloud-standard-4
timeout-minutes: 40
if: >
github.event_name != 'pull_request' ||
(
!contains(github.event.pull_request.labels.*.name, 'not ready') &&
contains(github.event.pull_request.labels.*.name, 'packages')
)
strategy:
fail-fast: false
matrix:
os: [deb11, deb12, ubuntu20.04, ubuntu22.04, ubuntu24.04]
pg: [15, 16]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: FerretDB/github-actions/setup-go@main
- name: Define Debian package version
id: version
run: |
cd ferretdb_packaging
go mod tidy
go mod verify
go run ./defineversion --control-file ../pg_documentdb_core/documentdb_core.control
- name: Build ${{ steps.version.outputs.version }}
if: steps.version.outputs.version != ''
run: ./ferretdb_packaging/build_packages.sh --os ${{ matrix.os }} --pg ${{ matrix.pg }} --version ${{ steps.version.outputs.version }} --test-clean-install
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.pg }}-${{ steps.version.outputs.version }}.zip
path: packaging/*.deb
retention-days: 1
if-no-files-found: error
compression-level: 0
overwrite: false
- name: Check dirty
run: |
git status
git diff --exit-code