Skip to content

Ignore viewer count signedness #74

Ignore viewer count signedness

Ignore viewer count signedness #74

Workflow file for this run

name: Build qwer
on:
push:
branches: [ trunk ]
workflow_call:
outputs:
crate-version:
description: "Version of the build artifact"
value: ${{ jobs.build.outputs.package_version }}
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Add musl ubuntu package
run: sudo apt-get install -y musl musl-dev musl-tools
- name: Add musl target
run: rustup target add x86_64-unknown-linux-musl
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-site-${{ hashFiles('**/Cargo.lock') }}
- name: Install NPM packages
run: npm install --prefix qw-site/frontend
- name: Build NPM project
run: npm run build --prefix qw-site/frontend
- name: Build qwer
run: cargo build --release --target x86_64-unknown-linux-musl -p qwer
- name: Get crate version
run: echo "CRATE_VERSION=$(sed -n -e 's/^version = \"\([0-9].\+\)\"/\1/p' ./qw-site/Cargo.toml)" >> $GITHUB_ENV
- name: Get package version
run: echo "PACKAGE_VERSION=$CRATE_VERSION.$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV
- name: Compress artifacts
run: tar -vpczf qwer.tar.gz --transform "s,^,qwer-${{ env.PACKAGE_VERSION }}/," ./build ./qw-site/frontend/dist ./qw-site/docs/output ./target/x86_64-unknown-linux-musl/release/qwer
- uses: actions/upload-artifact@master
with:
name: qwer-build-artifacts
path: qwer.tar.gz
outputs:
package_version: ${{ env.PACKAGE_VERSION }}