Improve HVD trace timeout diagnostics #57
This file contains hidden or 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 Skill | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Stable release version to publish, e.g. v1.3.6. Leave empty to auto-bump the latest patch version.' | |
| required: false | |
| type: string | |
| default: '' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Resolve release version | |
| id: release-version | |
| env: | |
| INPUT_VERSION: ${{ inputs.version }} | |
| run: | | |
| if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then | |
| tag="${GITHUB_REF_NAME}" | |
| elif [[ -n "${INPUT_VERSION}" ]]; then | |
| tag="${INPUT_VERSION}" | |
| elif [[ "${GITHUB_REF}" == refs/heads/master ]]; then | |
| latest="$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | head -n 1)" | |
| if [[ -z "${latest}" ]]; then | |
| tag="v1.0.0" | |
| elif [[ "${latest}" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then | |
| tag="v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.$((BASH_REMATCH[3] + 1))" | |
| else | |
| echo "Could not parse latest release tag: ${latest}" >&2 | |
| exit 1 | |
| fi | |
| else | |
| tag="" | |
| fi | |
| if [[ -n "${tag}" && ! "${tag}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
| echo "Release version must look like v1.2.3, got: ${tag}" >&2 | |
| exit 1 | |
| fi | |
| echo "tag=${tag}" >> "${GITHUB_OUTPUT}" | |
| - name: Sync Release Version | |
| if: steps.release-version.outputs.tag != '' | |
| run: python3 harmony-next/scripts/sync_release_version.py --version "${{ steps.release-version.outputs.tag }}" | |
| - name: Run Tests | |
| run: python3 -m unittest discover -s harmony-next/tests -p 'test_*.py' -v | |
| - name: Package Skill | |
| run: python3 harmony-next/scripts/package_skill.py --output harmony-next.skill.zip --release-tag "${{ steps.release-version.outputs.tag }}" --json | |
| - name: Create Nightly Release | |
| if: github.ref == 'refs/heads/master' && steps.release-version.outputs.tag == '' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: nightly | |
| name: Nightly | |
| prerelease: true | |
| files: harmony-next.skill.zip | |
| generate_release_notes: true | |
| append_body: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Auto Tagged Release | |
| if: github.ref == 'refs/heads/master' && steps.release-version.outputs.tag != '' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.release-version.outputs.tag }} | |
| target_commitish: ${{ github.sha }} | |
| files: harmony-next.skill.zip | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Tagged Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: harmony-next.skill.zip | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Manual Tagged Release | |
| if: github.event_name == 'workflow_dispatch' && steps.release-version.outputs.tag != '' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.release-version.outputs.tag }} | |
| files: harmony-next.skill.zip | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |