-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.46 KB
/
self_update.yaml
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
name: '📩 Self-Update'
on:
# Allow developer to trigger an automatic self-update, if needed.
workflow_dispatch:
# Once a day, check to see if there have been changes to the template project.
schedule:
# Since our package template updates automatically, this ensures it will
# never be unreleased for more than a day.
- cron: 0 0 * * * # end of every day
jobs:
self_update:
name: '📩 Self-Update'
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changes.outputs.changed }}
steps:
- name: '🧾 Checkout'
uses: actions/checkout@v3
with:
submodules: 'recursive'
lfs: true
token: ${{ secrets.GH_BASIC }}
ref: ${{ github.ref }}
- name: '🌏 Update Submodules'
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: '👀 See If Anything Changed'
id: changes
run: |
if [[ $(git status --porcelain) ]]; then
echo "Detected changes in repository."
echo "changed=1" >> $GITHUB_OUTPUT
else
echo "No changes in repository."
echo "changed=0" >> $GITHUB_OUTPUT
fi
release:
uses: './.github/workflows/release.yaml'
needs: self_update
if: needs.self_update.outputs.changed == 1
secrets:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GH_BASIC: ${{ secrets.GH_BASIC }}
with:
bump: patch