Skip to content

Commit 95cd3d7

Browse files
committed
Release action
1 parent d239777 commit 95cd3d7

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/release.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
on:
2+
push:
3+
tags:
4+
- v[0-9]+.[0-9]+.[0-9]+
5+
- v[0-9]+.[0-9]+.[0-9]+-*
6+
7+
name: "Release: Make release candidate"
8+
jobs:
9+
draft_release:
10+
name: ${{ matrix.os }} ${{ matrix.version }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- os: debian
17+
version: bookworm
18+
- os: ubuntu
19+
version: jammy
20+
- os: ubuntu
21+
version: noble
22+
permissions:
23+
contents: write
24+
pull-requests: write
25+
steps:
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
with:
29+
platforms: arm64
30+
31+
- name: Checkout repo
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Commit Hash
37+
id: commit
38+
uses: prompt/actions-commit-hash@v3
39+
40+
41+
- name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v3
43+
44+
- uses: jtdor/build-deb-action@v1
45+
with:
46+
docker-image: ${{ matrix.os == 'ubuntu' && format('ubuntu:{0}', matrix.version) || format('debian:{0}-slim', matrix.version) }}
47+
buildpackage-opts: --build=binary --no-sign
48+
before-build-hook: debchange --controlmaint --local "+${{ steps.commit.outputs.short }}~${{ matrix.version }}" -b --distribution ${{ matrix.version }} "CI build"
49+
extra-build-deps: devscripts git ninja-build
50+
51+
- name: release
52+
uses: actions/create-release@v1
53+
id: create_release
54+
with:
55+
draft: true
56+
prerelease: false
57+
release_name: "Releaese ${{ steps.commit.outputs.short }}~${{ matrix.version }}"
58+
tag_name: ${{ github.ref }}
59+
env:
60+
GITHUB_TOKEN: ${{ github.token }}
61+
62+
- name: upload linux artifact
63+
uses: actions/upload-release-asset@v1
64+
env:
65+
GITHUB_TOKEN: ${{ github.token }}
66+
with:
67+
upload_url: ${{ steps.create_release.outputs.upload_url }}
68+
asset_path: .debian/artifacts/openstreetmap-cgimap_*.deb
69+
asset_name: openstreetmap-cgimap_${{ matrix.version }}
70+
asset_content_type: ${{ matrix.asset_content_type }}
71+
72+

0 commit comments

Comments
 (0)