Skip to content

update tools

update tools #35

Workflow file for this run

name: Announce release
on:
push:
tags:
- '*-*-*'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- run: |
TAG=${GITHUB_REF##*/}
echo TAG=${TAG} >> $GITHUB_ENV
echo IMAGE=colomoto/colomoto-docker:${TAG} >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: release info
run: |
docker pull ${IMAGE}
docker run --rm ${IMAGE} apt list --installed > debian-installed-${TAG}.txt
docker run --rm ${IMAGE} conda list --explicit --md5 > conda-environment-${TAG}-explicit.yml
docker run --rm ${IMAGE} conda env export -c conda-forge -c colomoto --from-history > conda-environment-${TAG}.yml
python hooks/release_changes.py > CHANGELOG.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.TAG }}
body_path: CHANGELOG.txt
files: |
debian-installed-${{ env.TAG }}.txt
conda-environment-${{ env.TAG }}-explicit.yml
conda-environment-${{ env.TAG }}.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
ref: history
clean: false
- name: update history
run: |
mkdir ${TAG}
mv debian-* conda-* ${TAG}/
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ${TAG}
git commit -m "environment for ${TAG} image"
git push
mybinder:
name: Update mybinder branch
runs-on: ubuntu-latest
steps:
- run: echo GITHUB_TAG=$(echo $GITHUB_REF|cut -d/ -f3) >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
ref: mybinder/latest
- run: |
sed -i "s/^\(FROM .*:\).*$/\\1$GITHUB_TAG/" Dockerfile
echo HAS_CHANGES=$(git diff --quiet Dockerfile || echo 1) >> $GITHUB_ENV
- name: update mybinder
if: env.HAS_CHANGES == 1
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "follow release $GITHUB_TAG"
git tag mybinder/$GITHUB_TAG
git push --all