Skip to content

Update package.json #178

Update package.json

Update package.json #178

Workflow file for this run

name: Release
on:
push:
branches: [main]
tags-ignore: [dev]
defaults:
run:
shell: bash
# Cancel any in-flight jobs for the same PR/branch so there's only one active
# at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-cli:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: cli
strategy:
matrix:
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: arm-unknown-linux-gnueabi
os: ubuntu-latest
- target: arm-unknown-linux-gnueabihf
os: ubuntu-latest
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
- target: s390x-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
# So that windows uses StrawberryPerl which uses windows path separators
- run: rm -f /usr/bin/perl
if: matrix.os == 'windows-latest'
- uses: Swatinem/rust-cache@v2
with:
workspaces: "cli"
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path cli/Cargo.toml --release --locked --verbose --target=${{ matrix.target }}
use-cross: true
- run: ../ci/build-tarballs.sh "${{ matrix.target }}" "${{ matrix.target }}"
- uses: actions/upload-artifact@v1
with:
name: bins-${{ matrix.target }}
path: cli/dist
publish-cli:
needs: [build-cli]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
path: cli/dist
- name: Publish Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
prerelease: ${{ github.ref_name == 'main' && true || false }}
files: "cli/dist/**/*"
# publish-javascript-library:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# defaults:
# run:
# shell: bash
# working-directory: libraries/javascript
# steps:
# - uses: actions/checkout@v2
# - name: Calculate tag name
# run: |
# name=dev
# if [[ $GITHUB_REF == refs/tags/v* ]]; then
# name=${GITHUB_REF:10}
# fi
# echo ::set-output name=val::$name
# echo TAG=$name >> $GITHUB_ENV
# id: tagname
# - uses: actions/setup-node@v3
# with:
# node-version: '16.x'
# registry-url: 'https://npm.pkg.github.com'
# # Defaults to the user or organization that owns the workflow file
# scope: '@jakechampion'
# - run: npm ci
# - run: npm version "0.0.0-$GITHUB_SHA"
# - run: npm publish --tag dev --registry 'https://npm.pkg.github.com'
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}