Skip to content

ci: fix release permissions #33

ci: fix release permissions

ci: fix release permissions #33

Workflow file for this run

name: Release
on:
push:
tags:
- liwan-v[0-9]+.*
jobs:
create-release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: taiki-e/[email protected]
with:
changelog: CHANGELOG.md
allow-missing-changelog: true
draft: false # has to be public to have the right url's for the docker image
prefix: liwan
token: ${{ secrets.GITHUB_TOKEN }}
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build web project
run: |
bun install
bun run build
working-directory: ./web
- name: Upload web assets
uses: actions/upload-artifact@v4
with:
name: web-dist
path: ./web/dist
upload-assets:
permissions:
contents: write
needs: [create-release, build-web]
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
build-tool: cargo-zigbuild
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
build-tool: cargo-zigbuild
- target: aarch64-apple-darwin
os: macos-latest
build-tool: cargo
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/download-artifact@v4
with:
name: web-dist
path: ./web/dist
- uses: taiki-e/[email protected]
with:
bin: liwan
target: ${{ matrix.target }}
build-tool: ${{ matrix.build-tool }}
token: ${{ secrets.GITHUB_TOKEN }}
publish-container:
permissions:
packages: write
contents: read
needs: [create-release, upload-assets]
uses: explodingcamera/liwan/.github/workflows/container.yaml@main
with:
tag: ${{ github.ref_name }}