-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (79 loc) · 2.48 KB
/
deploy.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
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
name: Deployment
env:
package_name: mypackage # In case this is the same as the repository name, you can use: ${{ github.event.repository.name }}
on:
# Only triggers for new tags
push:
tags: "*"
jobs:
# Mostly the same as the main.yaml workflow, but we only use a single job
l3build:
runs-on: ubuntu-22.04
container:
image: registry.gitlab.com/islandoftex/images/texlive:latest
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout@v4
- name: Run l3build
run: l3build ctan -H --show-log-on-error
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: Package
path: |
*-ctan.zip
ctan.ann
- name: Validate CTAN package
uses: ./.github/actions/ctan-upload
with:
uploader: Dummy Name
email: dryrun@example.com
package_name: ${{ env.package_name }}
filename: "${{ env.package_name }}-ctan.zip"
dry-run: true
github:
runs-on: ubuntu-22.04
needs:
- l3build
# permissions required to create the release
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: "${{ env.package_name }}-ctan.zip"
prerelease: ${{ endsWith(github.ref, '-dev') }}
token: ${{ secrets.GITHUB_TOKEN }}
bodyFile: ctan.ann
ctan-upload:
# Only run the upload if on main branch
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-22.04
environment: CTAN
needs:
- l3build
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Only checkout the action settings. Sources are no required at this point
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: "${{ env.package_name }}-ctan.zip"
package_name: ${{ env.package_name }}
dry-run: true # TODO: Replace with false to enable release