github.com/quay/claircore@v1.5.28/.github/workflows/release.yml (about) 1 --- 2 name: Release 3 4 on: 5 push: 6 tags: 7 - v*.*.* 8 9 jobs: 10 release: 11 name: Release 12 runs-on: 'ubuntu-latest' 13 steps: 14 - name: Setup 15 run: | 16 tag=`basename ${{ github.ref }}` 17 echo "VERSION=${tag}" >> $GITHUB_ENV 18 - name: Checkout 19 uses: actions/checkout@v4 20 with: 21 fetch-depth: 0 22 - name: Changelog 23 run: | 24 git fetch origin refs/notes/changelog:refs/notes/changelog 25 .github/scripts/changelog-render "${VERSION}" > "${{github.workspace}}/changelog" 26 - name: Create Release 27 uses: actions/create-release@latest 28 env: 29 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 with: 31 tag_name: ${{ github.ref }} 32 release_name: ${{env.VERSION}} Release 33 body_path: ${{github.workspace}}/changelog 34 prerelease: ${{ contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta') || contains(env.VERSION, 'rc') }} 35 36 deploy-documentation: 37 runs-on: ubuntu-latest 38 needs: [release] 39 steps: 40 - name: Checkout 41 uses: actions/checkout@v4 42 43 - name: Setup mdBook 44 uses: peaceiris/actions-mdbook@v2 45 with: 46 mdbook-version: 'latest' 47 48 - name: mdBook Build 49 run: mdbook build --dest-dir ./book/$(basename ${GITHUB_REF}) 50 51 - name: Deploy 52 uses: peaceiris/actions-gh-pages@v4.0.0 53 with: 54 github_token: ${{ secrets.GITHUB_TOKEN }} 55 publish_dir: ./book 56 keep_files: true