mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-29 14:16:26 -04:00
Update CI
This commit is contained in:
parent
2dde9cff42
commit
6be9304523
51
.github/workflows/release-rpm.yaml
vendored
Normal file
51
.github/workflows/release-rpm.yaml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: Release RPM
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag to release'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check tag exists
|
||||
uses: mukunku/tag-exists-action@v1.6.0
|
||||
id: check-tag
|
||||
with:
|
||||
tag: ${{ github.event.inputs.tag }}
|
||||
- name: Exit if tag does not exist
|
||||
run: |
|
||||
if [[ "${{ steps.check-tag.outputs.exists }}" == "false" ]]; then
|
||||
echo "Tag ${{ github.event.inputs.tag }} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Include arm64 if ref is a tag
|
||||
setup-matrix:
|
||||
needs:
|
||||
- check
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Set up matrix
|
||||
id: set-matrix
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||
echo "matrix=[\"ubuntu-latest\", \"arm64\"]" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "matrix=[\"ubuntu-latest\"]" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build:
|
||||
needs:
|
||||
- setup-matrix
|
||||
strategy:
|
||||
matrix:
|
||||
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Dowload ${{ github.event.inputs.tag }} source code
|
||||
uses: robinraju/release-downloader@v1.9
|
Loading…
x
Reference in New Issue
Block a user