Skip to content

ci: rework main workflow for packaging #57

ci: rework main workflow for packaging

ci: rework main workflow for packaging #57

Workflow file for this run

name: Main
on:
push:
branches:
- main
permissions:
contents: read
jobs:
i18n_translations:
runs-on: ubuntu-latest
permissions:
actions: write
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
- name: Install dependencies
run: poetry install
- name: Run translation check script
run: poetry run python .scripts/missing_translation_check.py
- name: Create or Update Issues
run: poetry run python .scripts/create_or_update_i18n_issues.py
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: 5.3.5
- uses: leafo/gh-actions-luarocks@v4
with:
luarocksVersion: 3.11.1
- name: Install luarock dependencies
run: luarocks make --local rpglootfeed-1-1.rockspec
- name: Run Tests
run: make test-ci
- uses: actions/upload-artifact@v4
with:
name: luacov-html
path: luacov-html/
release:
needs: [run_tests, i18n_translations]
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
release_created: ${{ steps.check_release.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node .scripts/release.js
- name: Check release created
id: check_release
run: echo "release_created=${{ env.RELEASE_CREATED }}" >> $GITHUB_OUTPUT
package:
needs: release
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GH_PAT }}
steps:
- name: Clone project
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: subversion
version: test_package_apt_cache
- name: Package and release
uses: BigWigsMods/packager@v2