🐛 Fix index in documentation #26
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
# GitHub Actions workflow file. | |
# | |
# For more information, visit | |
# https://docs.github.com/actions/learn-github-actions. | |
--- | |
name: release | |
# Makes workflow run on Git tag. | |
on: | |
push: | |
tags: | |
- "**" | |
workflow_dispatch: | |
inputs: | |
debug: | |
default: false | |
description: Use Tmate session for debugging | |
type: boolean | |
env: | |
NPM_CONFIG_CACHE: "${{ github.workspace }}/.cache/npm" | |
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip" | |
PIP_DISABLE_PIP_VERSION_CHECK: "true" | |
PIP_ROOT_USER_ACTION: ignore | |
POETRY_CACHE_DIR: "${{ github.workspace }}/.cache/pypoetry" | |
POETRY_VIRTUALENVS_IN_PROJECT: "true" | |
PYTHON_KEYRING_BACKEND: "keyring.backends.null.Keyring" | |
jobs: | |
release: | |
name: Make GitHub release | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code repository | |
uses: actions/checkout@v3 | |
- name: Cache packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.cache | |
.venv | |
node_modules | |
key: >- | |
node-20_python-3.11_${{ runner.os }}_npm-${{ | |
hashFiles('package-lock.json') }}_poetry-${{ | |
hashFiles('poetry.lock') }} | |
- name: Install Node interpreter | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install Node packages | |
run: | | |
node --version | |
npm --version | |
npm ci | |
- name: Install Python interpreter | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Python packages | |
run: | | |
python --version | |
python -m pip --version | |
python -m pip install poetry | |
poetry install | |
- name: Build packages | |
run: | | |
sudo apt-get install --yes rpm | |
node scripts/build_package.js deb ${{ github.ref_name }} | |
node scripts/build_package.js rpm ${{ github.ref_name }} | |
- name: Build and publish collection | |
env: | |
ANSIBLE_GALAXY_TOKEN: ${{ secrets.ANSIBLE_GALAXY_TOKEN }} | |
run: | | |
cp CHANGELOG.md ansible_collections/scruffaluff/bootware/ | |
poetry run ansible-galaxy collection build ansible_collections/scruffaluff/bootware | |
poetry run ansible-galaxy collection publish --token "${ANSIBLE_GALAXY_TOKEN}" scruffaluff-bootware-${{ github.ref_name }}.tar.gz | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: >- | |
See the [changelog](https://github.com/scruffaluff/bootware/blob/${{ | |
github.ref_name }}/CHANGELOG.md) for more information. | |
files: | | |
scruffaluff-bootware-${{ github.ref_name }}.tar.gz | |
dist/bootware_${{ github.ref_name }}_all.deb | |
dist/bootware-${{ github.ref_name }}-1.fc33.noarch.rpm | |
name: Bootware ${{ github.ref_name }} | |
tag_name: ${{ github.ref }} | |
- name: Setup Tmate session if debug enabled | |
if: >- | |
${{ always() && github.event_name == 'workflow_dispatch' && | |
inputs.debug }} | |
timeout-minutes: 60 | |
uses: mxschmitt/action-tmate@v3 |