post release #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'post release' | |
on: | |
workflow_dispatch: | |
inputs: | |
V1: | |
description: 'The just released version' | |
required: true | |
type: string | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
doc_generate: | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_GEMFILE: Gemfile | |
BUNDLE_PATH: vendor/bundle | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
ref: next | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
working-directory: docs | |
- name: create release docs for ${{ github.event.inputs.V1 }} | |
run: | | |
cd docs | |
echo "releasename: ${V1}" >tmp | |
echo "baseurl: /release/${V1}" >>tmp | |
echo "repository: bndtools/bnd" >>tmp | |
cat _config.yml | sed '/^releasename: /d' | sed '/^baseurl: /d' | sed '/^repository: /d' >>tmp | |
mv tmp _config.yml | |
./build.sh | |
bundle exec jekyll build | |
rm -rf _site/releases | |
find _site -type f ! -name "*.html" -exec rm -f {} + | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: releasedocs | |
path: docs/_site/ | |
final: | |
needs: [doc_generate] | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ github.token }} | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
ref: master | |
- uses: actions/download-artifact@v4 | |
with: | |
name: releasedocs | |
path: docs/releases/${{ github.event.inputs.V1 }}/ | |
- name: create PR | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git checkout -B post-release | |
git add . | |
git commit -s -m "Post release ${{ github.event.inputs.V1 }}" | |
git push origin post-release --force | |
gh pr create -f -B master |