Build and release development branches #14
Workflow file for this run
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: Build and Release development documentation | |
on: | |
push: | |
branches: | |
- master # or any other branch you want to trigger the action | |
- manager-4.3 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
fetch-depth: 1 | |
- name: Configure environment and download the wrapper | |
run: | | |
alias docker='podman' | |
mkdir /tmp/susemanager | |
mkdir /tmp/uyuni | |
git clone --depth 1 https://github.com/uyuni-project/uyuni-docs-helper.git | |
cd uyuni-docs-helper | |
- name: Build the Uyuni documentation and archive it | |
run: | | |
/uyuni-docs-helper -r master -o /tmp/uyuni -c antora-uyuni-en -p uyuni | |
zip -r documentation-uyuni.zip /tmp/uyuni/build | |
if: startsWith(github.ref, 'master') | |
- name: Build the SUSE Manager documentation and archive it | |
./uyuni-docs-helper -r master -o /tmp/susemanager -c antora-suma-en -p suma | |
zip -r documentation-susemanager.zip /tmp/susemanager/build | |
- name: Create or Update the ${{ GITHUB_BASE_REF }}-package release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: master-package | |
release_name: Release ${{ github.ref }} | |
body: | | |
Latest build from the ${{ GITHUB_BASE_REF }} branch. | |
draft: false | |
prerelease: true | |
- name: Upload Uyuni package | |
uses: actions/upload-release-asset@v1 | |
if: startsWith(github.ref, 'master') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./documentation-uyuni.zip | |
asset_name: documentation-uyuni.zip | |
asset_content_type: application/zip | |
- name: Upload SUSE Manager package | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./documentation-susemanager.zip | |
asset_name: documentation-susemanager.zip | |
asset_content_type: application/zip |