-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (65 loc) · 1.81 KB
/
release.yml
File metadata and controls
69 lines (65 loc) · 1.81 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
---
name: Release
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.19.4"
- name: Install mustache processor
run: go install github.com/cbroglie/mustache/cmd/mustache@latest
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "2.19.2"
- name: Add meterials link to settings
run: echo "${{ format('release{0}', ':') }} ${{ github.ref_name }}" >> settings.yml
- name: Build materials
run: make
- name: Build Welcome email
run: mustache settings.yml WELCOME.md > welcome.md
- name: Create draft release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
prerelease: false
draft: true
body_path: welcome.md
files: |
materials.zip
- name: Save materials
uses: actions/upload-artifact@v3
with:
name: materials
path: materials.zip
create_release_branch:
name: Release branch
runs-on: ubuntu-latest
needs: release
steps:
- name: Download materials
uses: actions/download-artifact@v3
with:
name: materials
- shell: bash
run: |
unzip materials.zip
rm materials.zip
find ./ -type f -name '*.ipynb' -exec sed -i -e 's/attachment\://g' {} \;
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: ${{ github.ref_name }}
publish_dir: .
force_orphan: true
...