-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.55 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (41 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# SPDX-FileCopyrightText: 2026 [ernolf] Raphael Gradenwitz <raphael.gradenwitz@googlemail.com>
# SPDX-License-Identifier: MIT
#
# ncmake release workflow - https://github.com/ernolf/ncmake
#
# Commit this file verbatim as .github/workflows/release.yml. It carries no
# app-specific data: the shipped file set comes entirely from ncmake (keep model
# + .nextcloudignore), so this workflow is identical across all ncmake apps.
name: Release tarball
# Builds the install tarball with ncmake and, when a release is published,
# attaches it as a release asset. workflow_dispatch produces a downloadable
# artifact for testing without publishing a release. No secrets, no App Store
# upload: the store later only receives the download URL and a signature.
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
jobs:
tarball:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Build the release tarball
run: make build && make dist
- name: Locate the tarball
run: echo "TARBALL=$(ls build/artifacts/dist/*.tar.gz)" >> "$GITHUB_ENV"
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: release-tarball
path: build/artifacts/dist/*.tar.gz
- name: Attach to release
if: github.event_name == 'release'
run: gh release upload "${GITHUB_REF_NAME}" "${TARBALL}" --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}