-
Notifications
You must be signed in to change notification settings - Fork 105
77 lines (63 loc) · 2.65 KB
/
create_release.yml
File metadata and controls
77 lines (63 loc) · 2.65 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
name: Create release with _freeze
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: '1.11'
- name: Load Julia packages from cache
uses: julia-actions/cache@v2
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
# Note: use resolve() because of #518 and ensure that the hashed Manifest matches
# that used to create the _freeze folder
- name: Instantiate Julia environment
run: julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.resolve()'
- name: Restore cached _freeze folder
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
./_freeze/
key: |
${{ runner.os }}-${{ hashFiles('Manifest.toml') }}-${{ hashFiles('**/index.qmd') }}
restore-keys: |
${{ runner.os }}-${{ hashFiles('Manifest.toml') }}
- name: Render
run: quarto render
- name: Compress _freeze folder
run: tar -czf _freeze.tar.gz _freeze
- name: Generate tag name for release
id: tag
run: echo "tag_name=freeze_$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag_name }}
files: |
_freeze.tar.gz
Manifest.toml
body: |
This release contains the `_freeze` folder generated by Quarto when
rendering the docs. You can use this to speed up the rendering
process on your local machine by downloading and extracting the
`_freeze` folder, then placing it at the root of the project.
Note that the contents of the `_freeze` folder only hash the
contents of the .qmd files, and do not include information about
the Julia environment. Thus, each `_freeze` folder is only valid
for a given Julia environment, which is specified in the
Manifest.toml file included in this release. To ensure
reproducibility, you should make sure to use the Manifest.toml file
locally as well.
These releases are not automatically generated. To make an updated
release with the contents of the `_freeze` folder from the main
branch, you can run the `Create release with _freeze` workflow from
https://github.com/TuringLang/docs/actions/workflows/create_release.yml.