Skip to content

Check Dev Release

Check Dev Release #6

name: Check Dev Release
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
workflow_dispatch: # Allows manual triggering
jobs:
check-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check latest release version from Anaconda
id: check_anaconda
run: |
# Variables
ANACONDA_API_URL="https://api.anaconda.org/package/bsteubing/activity-browser-dev"
LABEL="main"
# Fetch the package information from Anaconda
PACKAGE_INFO=$(curl -s $ANACONDA_API_URL)
# Extract the latest version for the specified label
LATEST_VERSION=$(echo $PACKAGE_INFO | jq -r --arg LABEL "$LABEL" '.files[] | select(.labels[] == $LABEL) | .version' | sort -V | tail -n 1)
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
# Read the local version from version.json
LOCAL_VERSION=$(jq -r .dev ab_releases/current.json)
echo "Current version: $LOCAL_VERSION"
echo "LOCAL_VERSION=$LOCAL_VERSION" >> $GITHUB_ENV
build-dev-windows:
runs-on: windows-latest
needs: check-release
if: ${{ env.LOCAL_VERSION != env.LATEST_VERSION }}

Check failure on line 38 in .github/workflows/check_dev_update.yml

View workflow run for this annotation

GitHub Actions / Check Dev Release

Invalid workflow file

The workflow is not valid. .github/workflows/check_dev_update.yml (Line: 38, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.LOCAL_VERSION != env.LATEST_VERSION
steps:
- name: Perform action if new version is found
if: steps.check_anaconda.outputs.new_version == 'true'
run: |
echo "New version found, performing actions..."
# Add your actions here, for example:
# - Send a notification
# - Create an issue
# - Trigger another workflow