forked from davidfischer/mtg-printable-set-label-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (75 loc) · 1.89 KB
/
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
---
name: Release
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'LICENSE'
- '.github/dependabot.yml'
schedule:
# every Saturday
- cron: '0 0 * * 6'
workflow_dispatch:
env:
PIP_DISABLE_PIP_VERSION_CHECK: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: |
pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: poetry
- name: Install Python modules
run: |
poetry install --without dev
poetry run pip list
- name: Test generator.py
run: |
poetry run python mtglabels/generator.py --labels-per-sheet 30 --output-dir /tmp ice
snyk-python:
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Snyk to check for Python vulnerabilities
continue-on-error: true
uses: snyk/actions/python-3.10@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --sarif-file-output=snyk-python.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk-python.sarif
release:
needs:
- build
runs-on: ubuntu-22.04
concurrency: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@v9.15.2
with:
github_token: ${{ secrets.PAT }}