diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 7620083..6775a22 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -10,13 +10,24 @@ jobs: build: runs-on: ubuntu-latest container: oven/bun:1 + outputs: + artifact_name: ${{ steps.meta.outputs.name }} steps: - - name: Install git + - name: Install git and node run: apt-get update && apt-get install -y git nodejs - name: Checkout uses: actions/checkout@v4 + - name: Set artifact name + id: meta + run: | + if [[ "${{ github.ref_type }}" == "tag" ]]; then + tag="${GITHUB_REF_NAME#v}" + else + tag="$(date -u +%Y%m%d)" + fi + echo "name=nychthemeron_${tag}" >> "$GITHUB_OUTPUT" - name: Install dependencies run: bun install --frozen-lockfile @@ -30,7 +41,7 @@ jobs: run: bun run type-check -- --force - name: Build - run: bun run build-only + run: bun run build - name: Upload dist uses: actions/upload-artifact@v4