Skip to content

Commit

Permalink
fix: deprecation in ci - use environment files to share data between …
Browse files Browse the repository at this point in the history
…steps instead of the old set-output command
  • Loading branch information
dec1 committed May 13, 2024
1 parent bae5f02 commit 0756ee5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ jobs:
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.tagName }}" != "" ]]; then
echo "Using manually provided tag name: ${{ github.event.inputs.tagName }}"
echo "::set-output name=tag_name::${{ github.event.inputs.tagName }}"
echo "tag_name=${{ github.event.inputs.tagName }}" >> $GITHUB_ENV
else
echo "Determining the latest release tag..."
release_info=$(gh release view --json tagName -q .tagName)
echo "::set-output name=tag_name::$release_info"
echo "tag_name=$release_info" >> $GITHUB_ENV
fi
- name: Download the release asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Construct the asset file name
asset_name="${{ steps.get-tag-name.outputs.tag_name }}.zip"
# Read the tag name from the environment variable
asset_name="${{ env.tag_name }}.zip"
echo "Looking for asset: $asset_name"
# Use GitHub CLI to download the asset
gh release download "${{ steps.get-tag-name.outputs.tag_name }}" \
gh release download "${{ env.tag_name }}" \
--pattern "$asset_name" \
--dir .
- name: Extract the archive
run: |
asset_name="${{ steps.get-tag-name.outputs.tag_name }}.zip"
asset_name="${{ env.tag_name }}.zip"
unzip "$asset_name" -d extracted
# - name: Check for the specific file
Expand Down

0 comments on commit 0756ee5

Please sign in to comment.