Try again #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 | |
... |