Skip to content

Commit 48f75e2

Browse files
committed
Add nightly and release workflows
1 parent 831ee1c commit 48f75e2

2 files changed

Lines changed: 86 additions & 0 deletions

File tree

‎.github/workflows/nightly.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '17 3 * * *'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: "nightly"
10+
cancel-in-progress: false
11+
12+
permissions:
13+
contents: write
14+
id-token: write
15+
attestations: write
16+
artifact-metadata: write
17+
18+
jobs:
19+
nightly:
20+
runs-on: ubuntu-latest
21+
if: github.repository == 'galette-plugins/plugin-helloasso'
22+
steps:
23+
# bin/release -n resolves the local develop branch, so it has to exist.
24+
- name: Checkout
25+
uses: actions/checkout@v7
26+
with:
27+
ref: develop
28+
fetch-depth: 1
29+
30+
- name: Build and publish
31+
uses: galette/.github/actions/release-plugin@main

‎.github/workflows/release.yml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
# bin/release only accepts digits joined by dots
7+
- '[0-9]+.[0-9]+.[0-9]+'
8+
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Tag to build'
13+
required: true
14+
dry-run:
15+
description: 'Build only, publish nothing'
16+
type: boolean
17+
default: true
18+
19+
concurrency:
20+
group: "release-${{ github.ref }}"
21+
cancel-in-progress: false
22+
23+
permissions:
24+
contents: write
25+
id-token: write
26+
attestations: write
27+
artifact-metadata: write
28+
# the plugin page reads the latest release, so it has to be rebuilt after one
29+
pages: write
30+
31+
jobs:
32+
release:
33+
runs-on: ubuntu-latest
34+
steps:
35+
# The default branch, not the tag: bin/release archives the tag's tree
36+
# (git archive <tag>) but the tooling that does it has to be the current
37+
# one, exactly as when a maintainer runs it from their own checkout.
38+
# Not fetch-depth: 0 nor fetch-tags: true either, they would bring in
39+
# every tag, lightweight ones included, which bin/release cannot read.
40+
- name: Checkout
41+
uses: actions/checkout@v7
42+
with:
43+
ref: ${{ github.event.repository.default_branch }}
44+
fetch-depth: 1
45+
46+
- name: Fetch the annotated tag
47+
env:
48+
TAG: ${{ inputs.version || github.ref_name }}
49+
run: git fetch --no-tags --force --depth=1 origin "+refs/tags/${TAG}:refs/tags/${TAG}"
50+
51+
- name: Build and publish
52+
uses: galette/.github/actions/release-plugin@main
53+
with:
54+
version: ${{ inputs.version || github.ref_name }}
55+
dry-run: ${{ inputs.dry-run || false }}

0 commit comments

Comments
 (0)