-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (78 loc) · 2.34 KB
/
deploy.yaml
File metadata and controls
82 lines (78 loc) · 2.34 KB
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
name: Deployment
# Currently we run in two situations:
on:
# Only triggers for new tags
push:
tags: "*"
branches: '*'
jobs:
# Mostly the same as the main.yaml workflow, but we only use a single job
l3build:
runs-on: ubuntu-22.04
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout@v4
- name: Collect files
run: |
mkdir -p ctan/show-pdf-tags
cp LICENSE RelaxNG/*.{rnc,rng} show-pdf-tags/{README.md,show-pdf-tags*} ctan/show-pdf-tags
cd ctan
zip -r show-pdf-tags.zip show-pdf-tags
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: Package
path: |
ctan*
- name: Validate CTAN package
uses: ./.github/actions/ctan-upload
with:
uploader: Dummy Name
email: dryrun@example.com
filename: "ctan/show-pdf-tags.zip"
dry-run: true
github:
if: startsWith(github.event.ref, 'refs/tags/')
runs-on: ubuntu-22.04
needs:
- l3build
permissions:
contents: write
steps:
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: Package
- name: Create GitHub release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
id: release
with:
artifacts: "ctan/show-pdf-tags.zip"
prerelease: ${{ endsWith(github.ref, '-dev') }}
token: ${{ secrets.GITHUB_TOKEN }}
# bodyFile: ctan.ann
# If a test failed, we already notified in the other workflow. Here we notify
# when a release has been created.
ctan-upload:
if: "startsWith(github.event.ref, 'refs/tags/') && !endsWith(github.ref, '-dev')"
runs-on: ubuntu-22.04
environment: CTAN
needs:
- l3build
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: .github
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: Package
- name: Upload CTAN package
uses: ./.github/actions/ctan-upload
with:
uploader: ${{ secrets.CTAN_NAME }}
email: ${{ secrets.CTAN_EMAIL }}
filename: "ctan/show-pdf-tags.zip"
dry-run: false