-
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.71 KB
/
release.yml
File metadata and controls
65 lines (56 loc) · 1.71 KB
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
name: Release
on:
workflow_dispatch:
push:
branches: [ main ]
paths: [ src/** ]
defaults:
run:
shell: bash
permissions:
contents: read
packages: write
jobs:
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish Features
uses: devcontainers/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
publish-features: 'true'
base-path-to-features: ./src
generate-docs: 'true'
- name: Create PR for Documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eE -o pipefail
shopt -s inherit_errexit
echo "Setting up git"
git config --global user.email github-actions[bot]@users.noreply.github.com
git config --global user.name github-actions[bot]
git config pull.rebase false
echo "Creating new branch"
BRANCH=automated-documentation-update-${GITHUB_RUN_ID}
git checkout -b "${BRANCH}"
echo "Commiting changes"
git add */**/README.md
if git commit -m 'Automated documentation update [skip ci]'; then
echo "Changes committed"
echo "Pushing changes to remote"
git push origin "${BRANCH}"
MESSAGE='Automated documentation update'
echo "Creating pull request"
gh pr create --title "${MESSAGE}" --body "${MESSAGE}"
else
echo "No changes present - nothing to commit and push"
fi