-
Notifications
You must be signed in to change notification settings - Fork 6
105 lines (85 loc) · 2.3 KB
/
build-release.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Shabby Pages daily build
on:
push:
branches: [dev]
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get latest tag
id: tag
run: |
echo "::set-output name={TAG}::{git tag | sort -n | tail -1}"
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Generate the images
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
run: |
pip install git+https://github.com/sparkfish/augraphy
pip install -r requirements.txt
python daily_build.py
- uses: actions/upload-artifact@v3
with:
name: sample-images
path: cropped/
- uses: actions/upload-artifact@v3
with:
name: logs
path: logs/
- uses: actions/upload-artifact@v3
with:
name: names
path: names/
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: sample-images
path: cropped
- name: Debug
run: |
pwd
ls -R
- name: Daily Shabby Pages Sample
uses: softprops/action-gh-release@v1
with:
files: cropped/shabby/*
tag_name: ${{steps.tag.outputs.TAG}}
tweet:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: sample-images
path: cropped
- name: Debug
run: |
pwd
ls -R
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Post Tweet
env:
CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
run: |
pip install -r requirements.txt
python tweet.py