forked from flxzt/rnote
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 2.32 KB
/
dist.yml
File metadata and controls
74 lines (61 loc) · 2.32 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
name: Generate Dist Archive
"on":
release:
types: [published]
workflow_dispatch:
jobs:
dist:
runs-on: ubuntu-24.04
container: fedora:44
permissions:
# needed for uploading release artifact
contents: write
steps:
# Necessary so that 'Checkout' will clone as repository, which the `meson dist` commands needs,
# and that the artifact can be uploaded to github as release asset
- name: Install dependencies
run: |
dnf install -y git gh
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Add workspace as git safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install rust toolchain
id: toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: 1.95
- name: Prerequisites
run: |
dnf install -y just lsb_release
just ci=true prerequisites
- name: Setup
run: just ci=true setup-release
- name: Create tarball
run: just ci=true create-tarball
- name: Register archive file names
id: register_archive_file_names
run: |
echo "archive=$(basename _mesonbuild/meson-dist/rnote-*.tar.xz | tail -n1)" >> $GITHUB_OUTPUT
echo "sha=$(basename _mesonbuild/meson-dist/rnote-*.tar.xz.sha256sum | tail -n1)" >> $GITHUB_OUTPUT
- name: Upload dist archive (workflow artifact)
uses: actions/upload-artifact@v7
with:
name: rnote-dist-archive-artifact
path: |
_mesonbuild/meson-dist/${{ steps.register_archive_file_names.outputs.archive }}
_mesonbuild/meson-dist/${{ steps.register_archive_file_names.outputs.sha }}
include-hidden-files: true
if-no-files-found: error
- name: Upload dist archive (release asset)
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} \
_mesonbuild/meson-dist/${{ steps.register_archive_file_names.outputs.archive }}
gh release upload ${{ github.ref_name }} \
_mesonbuild/meson-dist/${{ steps.register_archive_file_names.outputs.sha }}