forked from revisit-studies/study
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (32 loc) · 1.5 KB
/
release.yaml
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
name: Release new version
on:
pull_request:
branches: [main]
types: [closed]
jobs:
release:
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Run make-release.sh to modify version numbers across the repo
run: |
LANG=C sed -i -E "s/\/re[Vv][Ii][Ss]it-studies\/study\/v.*\/src/\/revisit-studies\/study\/${{ github.event.pull_request.title }}\/src/g" src/**/*.* src/*.* public/**/*.* public/*.*
LANG=C sed -i -E "s/\/re[Vv][Ii][Ss]it-studies\/study\/tree\/v[^\/]*\/([^\s]*)/\/revisit-studies\/study\/tree\/${{ github.event.pull_request.title }}\/\1/g" src/**/*.* src/*.* public/**/*.* public/*.*
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "Jack Wilburn"
git add .
git commit -m "Release version ${{ github.event.pull_request.title }}"
git tag -a ${{ github.event.pull_request.title }} -m "Release version ${{ github.event.pull_request.title }}"
git push --follow-tags
- uses: peter-evans/repository-dispatch@v2
name: Build documentation in revisit.dev if repo is in revisit-studies
if: ${{ github.repository_owner == 'revisit-studies' }}
with:
token: ${{ secrets.PAT }}
repository: revisit-studies/reVISit-studies.github.io
event-type: study_repo_publish