2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-14 00:42:53 +00:00

Add script for automatic push to standalone branch

This commit is contained in:
Alexander Grund
2020-05-13 10:47:47 +02:00
parent 8836d6c5a6
commit eba43f79db

33
.github/workflows/update_standalone.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
on:
push:
branches: [develop]
name: Update standalone branch
env:
STANDALONE_BRANCH_NAME: standalone
jobs:
update:
name: Update standalone branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup git
run: |
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --global user.name "$GITHUB_ACTOR"
git fetch
- name: Create standalone version
run: |
bash tools/create_standalone.sh /tmp/nowide_standalone
git checkout "$STANDALONE_BRANCH_NAME" -- || git checkout -b "$STANDALONE_BRANCH_NAME"
git rm -r *
mv /tmp/nowide_standalone/* .
git add .
- name: Commit and push
run: |
git commit -am "Include '${{github.event.head_commit.message}}'"
remote_repo="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
git push "$remote_repo" HEAD:$STANDALONE_BRANCH_NAME