-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.3 KB
/
passage.yml
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
name: passage
on:
schedule:
- cron: "47 3 * * *"
push:
branches:
- main
paths:
- .github/workflows/passage.yml
workflow_dispatch:
concurrency:
group: passage
jobs:
fetch:
name: Fetch
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch
id: fetch
run: |
git clone https://github.com/FiloSottile/passage
cd passage
VERSION="$(git rev-list --count --all)"
if test -z "${VERSION}"; then
echo "Failed to count commits"
exit 1
fi
COMMIT="$(git rev-parse --short HEAD)"
if test -z "${COMMIT}"; then
echo "Failed to get short commit hash"
exit 1
fi
echo "Got version <${VERSION}.${COMMIT}>"
echo "version=${VERSION}.${COMMIT}" >>${GITHUB_OUTPUT}
- name: Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
allowUpdates: true
name: "passage v${{ steps.fetch.outputs.version }}"
tag: passage/${{ steps.fetch.outputs.version }}
draft: false
prerelease: false