-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (47 loc) · 1.79 KB
/
check_dev_update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Check Dev Release
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
workflow_dispatch: # Allows manual triggering
push:
branches:
- main
jobs:
check-release:
runs-on: ubuntu-latest
outputs:
current: ${{ steps.check_repo.current_version }}
latest: ${{ steps.check_anaconda.latest_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get current version from repo
id: check_repo
run: |
# Read the local version from version.json
CURRENT_VERSION=$(jq -r .dev ab_releases/current.json)
echo "Current version: $CURRENT_VERSION"
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
- name: Get latest 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"
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
build-dev-windows:
runs-on: windows-latest
needs: check-release
steps:
- name: Check latest release version from Anaconda
id: check_anaconda
run: env
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ab_releases/dev/windows/win-environment-${{needs.check-release.outputs.current}}.txt
create-args: --name environment