Skip to content

release

release #66

Workflow file for this run

name: release
on:
schedule:
# at midnight every Sunday (UTC)
- cron: "0 0 * * 0"
# Manual trigger of a release
workflow_dispatch:
inputs:
name:
description: "Reason"
required: true
default: ""
jobs:
release:
# can't depend on a job from another workflow
#needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 200
lfs: false
# fetch more tag info so git_version.ps1 works properly
- name: Ensure tags are fetched
# Retrieve annotated tags.
run: git fetch --tags --force
# The official GA does not allow downloading artifacts from another workflow.
# The artifacts will be extracted to directories that have the same name as the artifact. E.g.:
# /home/runner/work/_temp/artifacts/AP_win-x64_Release_21.6.0.111/AP_win-x64_Release_21.6.0.111.zip
# /home/runner/work/_temp/artifacts/AP_vars.json/AP_vars.json
# /home/runner/work/_temp/artifacts/AP_osx-x64_Release_21.6.0.111/AP_osx-x64_Release_21.6.0.111.tar.xz
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
workflow_conclusion: success
# Optional, uploaded artifact name,
# will download all artifacts if not specified
# and extract them in respective subdirectories
# https://github.com/actions/download-artifact#download-all-artifacts
#name:
path: "${{ runner.temp }}/artifacts"
- name: Prepare release and generate release notes
id: prepare_vars
shell: pwsh
run: . ./build/prepare_release.ps1 "${{ runner.temp }}"
- name: Release
uses: softprops/action-gh-release@master
with:
body_path: "${{ runner.temp }}/release_notes.txt"
draft: false
prerelease: true
name: ${{ steps.prepare_vars.outputs.AP_ReleaseTitle }}
tag_name: v${{ steps.prepare_vars.outputs.AP_Version }}
fail_on_unmatched_files: true
target_commitish: ${{ steps.prepare_vars.outputs.AP_CommitHash }}
files: |
${{ runner.temp }}/artifacts/**/*.zip
${{ runner.temp }}/artifacts/**/*.tar.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}