Skip to content

Commit

Permalink
added ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dec1 committed May 13, 2024
1 parent 244e369 commit a849877
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release Asset Check

on:
release:
types: [created, published]

jobs:
check-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install GitHub CLI
run: |
if ! command -v gh &> /dev/null
then
echo "GitHub CLI not found, installing..."
sudo apt update
sudo apt install -y gh
else
echo "GitHub CLI is already installed."
fi
gh --version
- name: Get the latest release
id: get-latest-release
run: |
# Use GitHub CLI to get the latest release information
echo "Getting latest release info..."
release_info=$(gh release view --json tagName -q .tagName)
echo "::set-output name=tag_name::$release_info"
- name: Download the release asset
run: |
# Construct the asset file name
asset_name="${{ steps.get-latest-release.outputs.tag_name }}.zip"
echo "Looking for asset: $asset_name"
# Use GitHub CLI to download the asset
gh release download "${{ steps.get-latest-release.outputs.tag_name }}" \
--pattern "$asset_name" \
--dir .

0 comments on commit a849877

Please sign in to comment.