forked from quay/claircore
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.48 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (50 loc) · 1.48 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
---
name: Release
on:
push:
tags:
- v*.*.*
jobs:
release:
name: Release
runs-on: 'ubuntu-latest'
steps:
- name: Setup
run: |
tag=`basename ${{ github.ref }}`
echo "VERSION=${tag}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Changelog
run: |
git fetch origin refs/notes/changelog:refs/notes/changelog
.github/scripts/changelog-render "${VERSION}" > "${{github.workspace}}/changelog"
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{env.VERSION}} Release
body_path: ${{github.workspace}}/changelog
prerelease: ${{ contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta') || contains(env.VERSION, 'rc') }}
deploy-documentation:
runs-on: ubuntu-latest
needs: [release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: 'latest'
- name: mdBook Build
run: mdbook build --dest-dir ./book/$(basename ${GITHUB_REF})
- name: Deploy
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
keep_files: true