feat: provide way to build and attach platforms
This commit is contained in:
@@ -27,6 +27,35 @@ jobs:
|
||||
- name: Verify (formatting, lint, tests, docs)
|
||||
run: pixi run check
|
||||
|
||||
docs:
|
||||
needs: check
|
||||
if: ${{ (gitea.event_name == 'push' && (gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/'))) || gitea.event_name == 'workflow_dispatch' }}
|
||||
runs-on: pixi-build-rust
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build the API docs
|
||||
env:
|
||||
RUSTDOCFLAGS: "--html-before-content ${{ gitea.workspace }}/scripts/docs-banner.html"
|
||||
run: |
|
||||
pixi install --locked
|
||||
pixi run doc-build
|
||||
|
||||
- name: Redirect the channel root to the crate page
|
||||
run: |
|
||||
printf '%s\n' "<!doctype html><meta http-equiv=\"refresh\" content=\"0; url=${CRATE}/\">" > target/doc/index.html
|
||||
|
||||
- name: Publish the channel to /srv/www
|
||||
run: |
|
||||
case "${{ gitea.ref }}" in
|
||||
refs/tags/*) channel=release ;;
|
||||
*) channel=nightly ;;
|
||||
esac
|
||||
bash scripts/publish-docs.sh "$channel"
|
||||
|
||||
- name: Point the site root at the latest release, else nightly
|
||||
run: bash scripts/redirect-docs.sh
|
||||
|
||||
nightly:
|
||||
needs: check
|
||||
if: ${{ (gitea.event_name == 'push' && gitea.ref == 'refs/heads/main') || gitea.event_name == 'schedule' || gitea.event_name == 'workflow_dispatch' }}
|
||||
@@ -42,7 +71,7 @@ jobs:
|
||||
- name: Install the pinned toolchain
|
||||
run: pixi install
|
||||
|
||||
- name: Build the release binary
|
||||
- name: Build and stage the bundle
|
||||
run: |
|
||||
COURSEBANK_VERSION="$(bash scripts/nightly-version.sh)"
|
||||
export COURSEBANK_VERSION
|
||||
@@ -94,7 +123,7 @@ jobs:
|
||||
pixi run dist
|
||||
|
||||
- name: Package
|
||||
run: bash scripts/package.sh "coursebank-$(bash scripts/version.sh)-linux-x64.tar.gz" dist
|
||||
run: bash scripts/package.sh "coursebank-$(bash scripts/version.sh)-$(bash scripts/platform-tag.sh).tar.gz" dist
|
||||
|
||||
- name: Publish the release
|
||||
env:
|
||||
@@ -104,35 +133,6 @@ jobs:
|
||||
TAG: ${{ gitea.ref_name }}
|
||||
BODY: See CHANGELOG.md.
|
||||
run: |
|
||||
asset="coursebank-$(bash scripts/version.sh)-linux-x64.tar.gz"
|
||||
asset="coursebank-$(bash scripts/version.sh)-$(bash scripts/platform-tag.sh).tar.gz"
|
||||
export ASSETS="$asset $asset.sha256"
|
||||
bash scripts/gitea-release.sh
|
||||
|
||||
docs:
|
||||
needs: check
|
||||
if: ${{ (gitea.event_name == 'push' && (gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/'))) || gitea.event_name == 'workflow_dispatch' }}
|
||||
runs-on: pixi-build-rust
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build the API docs
|
||||
env:
|
||||
RUSTDOCFLAGS: "--html-before-content ${{ gitea.workspace }}/scripts/docs-banner.html"
|
||||
run: |
|
||||
pixi install --locked
|
||||
pixi run doc-build
|
||||
|
||||
- name: Redirect the channel root to the crate page
|
||||
run: |
|
||||
printf '%s\n' "<!doctype html><meta http-equiv=\"refresh\" content=\"0; url=${CRATE}/\">" > target/doc/index.html
|
||||
|
||||
- name: Publish the channel to /srv/www
|
||||
run: |
|
||||
case "${{ gitea.ref }}" in
|
||||
refs/tags/*) channel=release ;;
|
||||
*) channel=nightly ;;
|
||||
esac
|
||||
bash scripts/publish-docs.sh "$channel"
|
||||
|
||||
- name: Point the site root at the latest release, else nightly
|
||||
run: bash scripts/redirect-docs.sh
|
||||
|
||||
Reference in New Issue
Block a user