Merge branch 'main' into release #23
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: Release | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
on: | ||
push: | ||
branches: | ||
- release | ||
jobs: | ||
# Release unpublished packages. | ||
release-plz-release: | ||
name: Release-plz release | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run release-plz | ||
uses: release-plz/[email protected] | ||
with: | ||
command: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} | ||
# Create a PR with the new versions and changelog, preparing the next release. | ||
release-plz-pr: | ||
name: Release-plz PR | ||
runs-on: self-hosted | ||
concurrency: | ||
group: release-plz-${{ github.ref }} | ||
cancel-in-progress: false | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: release | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: release-plz/[email protected] | ||
with: | ||
ref: release | ||
command: release-pr | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} | ||
build_docs: | ||
name: Build Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: release | ||
- name: Generate Docs | ||
run: cargo doc --no-deps --document-private-items | ||
- name: Add index.html | ||
run: | | ||
echo '<meta http-equiv="refresh" content="0; url=hip-rs/index.html">' > target/doc/index.html | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Configure cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Setup pages | ||
id: pages | ||
uses: actions/configure-pages@v5 | ||
- name: Clean docs folder | ||
run: cargo clean --doc | ||
- name: Build docs | ||
run: cargo doc --no-deps | ||
- name: Add redirect | ||
run: echo '<meta http-equiv="refresh" content="0;url=hip-rs/index.html">' > target/doc/index.html | ||
- name: Remove lock file | ||
run: rm target/doc/.lock | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: target/doc | ||
deploy_docs: | ||
name: Deploy Docs | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
Check failure on line 94 in .github/workflows/release.yaml GitHub Actions / ReleaseInvalid workflow file
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |