Skip to content

Dont create release in ci #6

Dont create release in ci

Dont create release in ci #6

Workflow file for this run

name: Release artifacts
on:
push:
tags: ['v*']
workflow_dispatch:
permissions:
contents: write
id-token: write
jobs:
publish-server:
if: startsWith(github.ref, 'refs/tags/')
name: Publish Server to RubyGems
runs-on: ubuntu-latest
defaults: { run: { working-directory: server } }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rubygems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.4'
bundler-cache: true
working-directory: server
- name: Release server gem
uses: hybras/release-gem@v1
with:
working-directory: server
publish-client-go:
name: Check Go Client
runs-on: ubuntu-latest
defaults: { run: { working-directory: client-go } }
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Checkout
uses: actions/checkout@v4
- name: Build go client
run: |
go mod tidy
go mod vendor
go build
go install
# go test
lint-format-client-rs:
name: Lint and Format rust client
runs-on: ubuntu-latest
defaults:
run:
working-directory: client-rs
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: client-rs
- name: Install protobuf
uses: taiki-e/install-action@v2
with:
tool: protoc
- name: Lint
run: cargo clippy --no-deps --all-targets -- -D warnings
- name: Format
run: cargo fmt --check
build-client-rs:
name: Build rust client for ${{ matrix.job.target }} (on ${{ matrix.job.os }})
needs: [lint-format-client-rs]
runs-on: ${{ matrix.job.os }}
defaults: { run: { working-directory: client-rs } }
strategy:
fail-fast: false
matrix:
job:
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
on-pr: true
- target: aarch64-apple-darwin
os: macos-14
on-pr: true
- target: arm-unknown-linux-gnueabihf
os: ubuntu-latest
- target: arm-unknown-linux-musleabihf
os: ubuntu-latest
- target: i686-pc-windows-msvc
os: windows-2019
- target: i686-unknown-linux-gnu
os: ubuntu-latest
- target: i686-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-13
- target: x86_64-pc-windows-msvc
os: windows-2019
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
on-pr: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install protobuf,cargo-zigbuild,just
uses: taiki-e/install-action@v2
with:
tool: cargo-zigbuild, protoc,just
- name: Install zig
uses: mlugg/setup-zig@v1
- name: Install Rust toolchain
id: rust-toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.job.target }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: client-rs
key: os-${{ matrix.job.os }}-target-${{ matrix.job.target }}-rust-${{ steps.rust-toolchain.outputs.toolchain }}
- name: Upload rust binary
uses: taiki-e/upload-rust-binary-action@v1
with:
locked: true
bin: asciidoctor-client
target: ${{ matrix.job.target }}
token: ${{ secrets.GITHUB_TOKEN }}