-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (51 loc) · 1.8 KB
/
update_donors.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
name: Update Donors
on:
schedule:
- cron: '0 */8 * * *'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
update-donors:
permissions:
contents: write
if: github.repository == 'bevyengine/bevy-donors'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
# Uncomment this to switch from calling Every.org APIs to pulling manual CSV dumps of every.org donor data from bevyengine/every_org_donors
# - uses: actions/checkout@v4
# with:
# ssh-key: ${{ secrets.EVERY_ORG_PRIVATE_KEY }}
# repository: bevyengine/every_org_donors
# path: every_org_donors
- uses: dtolnay/rust-toolchain@stable
- name: Generate donors.toml and metrics.toml
env:
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
EVERY_ORG_SESSION_COOKIE: ${{ secrets.EVERY_ORG_SESSION_COOKIE }}
run: |
cargo run
- name: Tag the repository
id: tag
run: |
# See https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names
TAG=v$(date -Iseconds | sed 's/[T:\+]/-/g')
echo "$TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
git config user.name "GitHub Action"
git config user.email "[email protected]"
git tag -a $TAG -m "Published version $TAG" ${GITHUB_SHA}
git push origin $TAG
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
files: |
donors.toml
metrics.toml
- name: trigger website deploy
run: gh --repo bevyengine/bevy-website workflow run deploy.yml
env:
GITHUB_TOKEN: ${{ secrets.CART_PAT }}