mirror of
https://github.com/TimInTech/proxmox-manager.git
synced 2026-11-25 12:44:20 +03:00
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
release:
|
|
name: Publish release
|
|
permissions:
|
|
contents: write # Required to create a GitHub release and upload its asset.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Verify release tag matches core version
|
|
run: |
|
|
set -euo pipefail
|
|
version=$(bash proxmox-manager.sh --version | awk '{print $2}')
|
|
if [[ "$GITHUB_REF_NAME" != "v$version" ]]; then
|
|
printf 'Release tag %s does not match core version v%s\n' "$GITHUB_REF_NAME" "$version" >&2
|
|
exit 1
|
|
fi
|
|
|
|
- name: Run Bash integration tests
|
|
run: |
|
|
set -euo pipefail
|
|
bash tests/run.sh
|
|
bash tests/test_inventory.sh
|
|
bash tests/test_spice.sh
|
|
|
|
- name: Run maintenance tests
|
|
run: python3 -B -m unittest discover -s tests/maintenance -v
|
|
|
|
- name: Build and verify core and optional module assets
|
|
run: |
|
|
set -euo pipefail
|
|
bash tools/build-release.sh dist
|
|
cd dist
|
|
sha256sum --check --strict SHA256SUMS
|
|
|
|
- name: Create GitHub Release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh release create "$GITHUB_REF_NAME" dist/* \
|
|
--verify-tag \
|
|
--title "$GITHUB_REF_NAME" \
|
|
--notes ""
|