bat-extras/.github/workflows/release.yaml
2023-06-15 16:42:49 -07:00

59 lines
1.6 KiB
YAML

name: Release
on:
release: {}
push:
tags: ['*']
jobs:
"Wait":
runs-on: ubuntu-latest
steps:
- name: Wait for tests to succeed
uses: lewagon/wait-on-check-action@v1.0.0
if: ${{ !env.ACT }}
with:
ref: ${{ github.ref }}
running-workflow-name: 'Test'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
"Release":
runs-on: ubuntu-latest
needs: ["Wait"]
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Install build dependencies
uses: ./.github/actions/install-dependencies
with:
build: true
test: false
- name: Build
uses: ./.github/actions/build
with:
minify: lib
manuals: true
verify: false
inline: false
- name: Create zipball
run: bash "${{ github.workspace }}/.github/actions/build/create-zipball.sh"
- name: Generate changelog
id: changelog
run: |
output_file="release-notes.md"
output_title="Release: $(date '+%Y-%m-%d')"
bash "${{ github.workspace }}/.github/actions/build/create-release-notes.sh" | tee "${output_file}"
echo "::set-output name=file::${output_file}"
echo "::set-output name=title::${output_title}"
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "bat-extras-*.zip"
bodyFile: "${{steps.changelog.outputs.file}}"
name: "${{steps.changelog.outputs.title}}"