Skip to content

chore(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 #117

chore(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1

chore(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 #117

Workflow file for this run

name: CI
on:
push:
workflow_dispatch:
concurrency:
group: "github-pages"
cancel-in-progress: false
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
name: trunk build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Enable Rust cache
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
- name: Setup trunk
uses: jetli/trunk-action@69821d4eec12c308c4b811e459e37556cf920057 # v0.5.0
with:
version: 'latest'
- name: Check format
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --all-features -- -D warnings
- name: trunk build
run: trunk build --release && ls -laR dist/
env:
TRUNK_BUILD_PUBLIC_URL: "/beercalc/"
- name: replace branch name
run: |
echo "REPL_BRANCH_NAME=${BR_NAME////_}" >> $GITHUB_ENV
env:
BR_NAME: ${{ github.head_ref || github.ref_name }}
- name: upload artifact
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: dist-${{ env.REPL_BRANCH_NAME }}
path: dist/
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: replace branch name
run: |
echo "REPL_BRANCH_NAME=${BR_NAME////_}" >> $GITHUB_ENV
env:
BR_NAME: ${{ github.head_ref || github.ref_name }}
- name: Download artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: dist-${{ env.REPL_BRANCH_NAME }}
path: dist/
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: 'dist'
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5