-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (39 loc) · 1.28 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
name: Announce release
on:
push:
tags:
- '*-*-*'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- run: echo ::set-env name=GITHUB_TAG::$(echo $GITHUB_REF|cut -d/ -f3)
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- run: python hooks/release_changes.py > CHANGELOG.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
name: colomoto/colomoto-docker:${{ env.GITHUB_TAG }}
body_path: CHANGELOG.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mybinder:
name: Update mybinder branch
runs-on: ubuntu-latest
steps:
- run: echo ::set-env name=GITHUB_TAG::$(echo $GITHUB_REF|cut -d/ -f3)
- uses: actions/checkout@v2
with:
ref: mybinder
- run: |
sed -i "s/^\(FROM .*:\).*$/\\1$GITHUB_TAG/" Dockerfile
echo ::set-env name=HAS_CHANGES::$(git diff --quiet Dockerfile || echo 1)
- 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 push