-
-
Notifications
You must be signed in to change notification settings - Fork 35
135 lines (116 loc) · 4.29 KB
/
release.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: release
on:
workflow_dispatch: null
push:
branches:
- main
env:
PY_COLORS: "1"
concurrency:
group: release
cancel-in-progress: false
jobs:
tag-and-release:
name: tag-and-release
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -leo pipefail {0}
outputs:
new_version: ${{ steps.version.outputs.NEXT }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: compute next version
id: version
run: |
echo "current version: "$(git describe --tags --abbrev=0)
NEXT=$(python scripts/compute_next_version.py)
echo "next version: ${NEXT}"
echo "NEXT=${NEXT}" >> "$GITHUB_OUTPUT"
- name: tag and release
run: |
python scripts/release.py "${{ steps.version.outputs.NEXT }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# FIXME: uncomment this when dispatch work is here
# build-and-push-dispatch-container:
# name: build and push dispatch container
# runs-on: "ubuntu-latest"
# needs: tag-and-release
# defaults:
# run:
# shell: bash -leo pipefail {0}
# env:
# IMAGE_NAME: condaforge/conda-forge-webservices-gha-dispatch
# steps:
# - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# with:
# fetch-depth: 0
# - uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1
# with:
# environment-file: conda-lock.yml
# environment-name: webservices
# condarc: |
# show_channel_urls: true
# channel_priority: strict
# channels:
# - conda-forge
# - name: set up docker buildx
# uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
# - name: login to docker hub
# uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
# with:
# username: condaforgebot
# password: ${{ secrets.CF_BOT_DH_PASSWORD }}
# - name: build docker metadata
# id: meta
# uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
# with:
# images: ${{ env.IMAGE_NAME }}
# flavor: |
# latest=false
# tags: |
# type=raw,value=${{ needs.tag-and-release.outputs.new_version }}
# type=raw,value=latest
# - name: build and push image
# uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6
# with:
# context: .
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# - name: push README to docker hub
# uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
# env:
# DOCKER_USER: condaforgebot
# DOCKER_PASS: ${{ secrets.CF_BOT_DH_PASSWORD }}
# with:
# destination_container_repo: ${{ env.IMAGE_NAME }}:${{ needs.tag-and-release.outputs.new_version }}
# provider: dockerhub
# short_description: "conda-forge-webservices image used to power the admin webservices GitHub Actions integrations"
# readme_file: "Dockerfile_README.md"
build-and-push-to-heroku:
name: build and push to heroku
runs-on: "ubuntu-latest"
needs: tag-and-release # FIXME: change to build-and-push-dispatch-container when we do that
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: ${{ needs.tag-and-release.outputs.new_version }}
- name: build and push to heroku
uses: gonuit/heroku-docker-deploy@9ab97585f979857642d66612a2ae4062b3347d53
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: conda-forge