Skip to content

Commit a2267a8

Browse files
committed
CI/CD updates
1 parent e3e2394 commit a2267a8

2 files changed

Lines changed: 46 additions & 2 deletions

File tree

.github/workflows/main.yaml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
branches:
55
- main
66
- minor
7+
- major
78
push:
89
branches:
910
- main
11+
- major
1012

1113
jobs:
1214
patch-test-environment:
@@ -102,7 +104,7 @@ jobs:
102104
needs:
103105
- tests
104106
# And only on a push event, not a pull_request.
105-
if: ${{ github.event_name == 'push' }}
107+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
106108
runs-on: ubuntu-latest
107109
defaults:
108110
run:
@@ -137,3 +139,46 @@ jobs:
137139
run: |
138140
anaconda -t ${{ secrets.CONDA_UPLOAD_TOKEN }} upload \
139141
/usr/share/miniconda/envs/build/conda-bld/noarch/*.conda
142+
143+
deploy-beta:
144+
# Make sure to only run a deploy if all tests pass.
145+
needs:
146+
- tests
147+
# And only on a push event, not a pull_request.
148+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/major' }}
149+
runs-on: ubuntu-latest
150+
defaults:
151+
run:
152+
shell: bash -l {0}
153+
env:
154+
PKG_NAME: "activity-browser-beta"
155+
steps:
156+
- uses: actions/checkout@v3
157+
with:
158+
fetch-depth: "0"
159+
- name: Build and deploy 3.11
160+
uses: conda-incubator/setup-miniconda@v2
161+
with:
162+
python-version: 3.11
163+
activate-environment: build
164+
environment-file: .github/conda-envs/build.yml
165+
- name: Export version
166+
run: |
167+
ID=$(git rev-list 2.11.0..HEAD --count)
168+
VERSION="3.b.${ID}"
169+
echo "VERSION=$VERSION" >> $GITHUB_ENV
170+
- name: Patch recipe with run requirements from stable
171+
uses: mikefarah/yq@master
172+
# Adds the run dependencies from the stable recipe to the dev recipe (inplace)
173+
with:
174+
cmd: |
175+
yq eval-all -i 'select(fi == 0).requirements.run += select(fi == 1).requirements.run | select(fi == 0)' .github/dev-recipe/meta.yaml recipe/meta.yaml
176+
- name: Show patched dev recipe
177+
run: cat .github/dev-recipe/meta.yaml
178+
- name: Build beta package
179+
run: |
180+
conda build .github/dev-recipe/
181+
- name: Upload the activity-browser-dev package
182+
run: |
183+
anaconda -t ${{ secrets.CONDA_MRVISSCHER }} upload \
184+
/usr/share/miniconda/envs/build/conda-bld/noarch/*.conda

.github/workflows/release.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
push:
44
tags:
55
- '*'
6-
workflow_dispatch:
76

87
jobs:
98
release:

0 commit comments

Comments
 (0)