Skip to content

Commit c4cde82

Browse files
committed
ci: Update Github actions configuration
1 parent 045936a commit c4cde82

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed

.github/workflows/continuous-integration.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
git config --global core.eol lf
2424
2525
- name: Checkout
26-
uses: actions/[email protected].1
26+
uses: actions/[email protected].2
2727
with:
2828
fetch-depth: 1
2929

.github/workflows/prune.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# https://docs.github.com/en/actions
2+
3+
name: "Prune"
4+
5+
on: # yamllint disable-line rule:truthy
6+
schedule:
7+
- cron: "0 12 * * *"
8+
9+
env:
10+
DAYS_BEFORE_CLOSE: 5
11+
DAYS_BEFORE_STALE: 5
12+
13+
jobs:
14+
prune:
15+
name: "Issues"
16+
17+
runs-on: "ubuntu-latest"
18+
19+
steps:
20+
- name: "Prune issues and pull requests"
21+
uses: "actions/[email protected]"
22+
with:
23+
days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}"
24+
days-before-stale: "${{ env.DAYS_BEFORE_STALE }}"
25+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
26+
stale-issue-label: "stale"
27+
stale-issue-message: |
28+
Since this issue has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale.
29+
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days.
30+
stale-pr-label: "stale"
31+
stale-pr-message: |
32+
Since this pull request has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale.
33+
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days.

.github/workflows/release.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# https://docs.github.com/en/actions
2+
3+
name: "Release"
4+
5+
on: # yamllint disable-line rule:truthy
6+
push:
7+
tags:
8+
- "**"
9+
10+
jobs:
11+
release:
12+
name: "Release"
13+
14+
runs-on: "ubuntu-latest"
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/[email protected]
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Determine tag
23+
id: tag_name
24+
run: |
25+
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
26+
shell: bash
27+
28+
- name: Get Changelog Entry
29+
id: changelog_reader
30+
uses: mindsers/changelog-reader-action@v2
31+
with:
32+
version: ${{ steps.tag_name.outputs.current_version }}
33+
path: ./CHANGELOG.md
34+
35+
- name: "Create release"
36+
uses: "actions/[email protected]"
37+
env:
38+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
39+
with:
40+
release_name: "${{ steps.tag_name.outputs.current_version }}"
41+
tag_name: "${{ steps.tag_name.outputs.current_version }}"
42+
body: ${{ steps.changelog_reader.outputs.changes }}
43+
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
44+
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}

0 commit comments

Comments
 (0)