Skip to content

Commit 3d4ffe2

Browse files
Merge pull request #13 from YDX-2147483647/archive
2 parents 067cf07 + a31f1b1 commit 3d4ffe2

5 files changed

Lines changed: 23 additions & 16 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
description: Whether to publish artifacts in a new release.
1818
default: false
1919
type: boolean
20+
pull_request:
21+
paths:
22+
- .github/workflows/docs.yaml
2023

2124
# This workflow cannot share caches with typst.yaml, because x86_64-unknown-linux-gnu ≠ x86_64-unknown-linux-musl.
2225

@@ -26,12 +29,15 @@ jobs:
2629
runs-on: ubuntu-latest
2730
permissions:
2831
contents: write
29-
32+
env:
33+
INPUT_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || 'main' }}
34+
INPUT_DOCS_BASE: ${{ github.event_name == 'workflow_dispatch' && inputs.docs_base || '/DOCS-BASE/' }}
35+
INPUT_RELEASE: ${{ github.event_name == 'workflow_dispatch' && inputs.release || false }}
3036
steps:
3137
- uses: actions/checkout@v6
3238
with:
3339
repository: typst/typst
34-
ref: ${{ github.event.inputs.ref }}
40+
ref: ${{ env.INPUT_REF }}
3541

3642
- uses: actions/checkout@v6
3743
with:
@@ -59,7 +65,7 @@ jobs:
5965
6066
- name: Build docs
6167
run: |
62-
cargo run --package typst-docs --release -- --assets-dir assets/ --out-file docs.json --base "${{ github.event.inputs.docs_base }}"
68+
cargo run --package typst-docs --release -- --assets-dir assets/ --out-file docs.json --base "${{ env.INPUT_DOCS_BASE }}"
6369
6470
- name: Prepare to upload
6571
shell: bash
@@ -68,18 +74,19 @@ jobs:
6874
7z a docs-assets.zip assets/
6975
7076
- name: Upload docs.json
71-
uses: actions/upload-artifact@v6
77+
uses: actions/upload-artifact@v7
7278
with:
7379
name: docs.json
7480
path: docs.json
81+
archive: true
7582
- name: Upload docs-assets
76-
uses: actions/upload-artifact@v6
83+
uses: actions/upload-artifact@v7
7784
with:
78-
name: docs-assets
7985
path: docs-assets.zip
86+
archive: false
8087

8188
- uses: softprops/action-gh-release@v2
82-
if: ${{ inputs.release }}
89+
if: ${{ env.INPUT_RELEASE == 'true' }}
8390
env:
8491
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8592
with:
@@ -91,6 +98,6 @@ jobs:
9198
docs.json
9299
docs-assets.zip
93100
- name: Report the release
94-
if: ${{ inputs.release }}
101+
if: ${{ env.INPUT_RELEASE == 'true' }}
95102
run: |
96103
echo "Please publish the [draft release](https://github.com/typst-community/dev-builds/releases)." >> "$GITHUB_STEP_SUMMARY"

.github/workflows/hayagriva.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ jobs:
110110
tar cJf $directory.tar.xz $directory
111111
fi
112112
113-
- uses: actions/upload-artifact@v6
113+
- uses: actions/upload-artifact@v7
114114
with:
115-
name: hayagriva-${{ matrix.target }}
116115
path: "hayagriva-${{ matrix.target }}.*"
116+
archive: false
117117

118118
- uses: softprops/action-gh-release@v2
119119
if: ${{ env.INPUT_RELEASE == 'true' }}

.github/workflows/package-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ jobs:
133133
tar cJf $directory.tar.xz $directory
134134
fi
135135
136-
- uses: actions/upload-artifact@v6
136+
- uses: actions/upload-artifact@v7
137137
with:
138-
name: typst-package-check-${{ matrix.target }}
139138
path: "typst-package-check-${{ matrix.target }}.*"
139+
archive: false
140140

141141
- uses: softprops/action-gh-release@v2
142142
if: ${{ env.INPUT_RELEASE == 'true' }}

.github/workflows/packages-bundler.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ jobs:
123123
tar cJf $directory.tar.xz $directory
124124
fi
125125
126-
- uses: actions/upload-artifact@v6
126+
- uses: actions/upload-artifact@v7
127127
with:
128-
name: packages-bundler-${{ matrix.target }}
129128
path: "packages-bundler-${{ matrix.target }}.*"
129+
archive: false
130130

131131
- uses: softprops/action-gh-release@v2
132132
if: ${{ env.INPUT_RELEASE == 'true' }}

.github/workflows/typst.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ jobs:
9696
tar cJf $directory.tar.xz $directory
9797
fi
9898
99-
- uses: actions/upload-artifact@v6
99+
- uses: actions/upload-artifact@v7
100100
with:
101-
name: typst-${{ matrix.target }}
102101
path: "typst-${{ matrix.target }}.*"
102+
archive: false
103103

104104
- uses: softprops/action-gh-release@v2
105105
if: ${{ env.INPUT_RELEASE == 'true' }}

0 commit comments

Comments
 (0)