Skip to content

try rust-analyzer's release workflow #6

try rust-analyzer's release workflow

try rust-analyzer's release workflow #6

Workflow file for this run

name: Rust Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
targets: ['x86_64-unknown-linux-musl', 'x86_64-unknown-linux-gnu']
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Install musl-tools
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Build
run: |
rustup target add ${{ matrix.targets }}
cargo build --release --target=${{ matrix.targets }}
cp target/${{ matrix.targets }}/release/otk otk-${{ matrix.targets }}
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: otk-${{ matrix.targets }}
path: otk-${{ matrix.targets }}
release:
name: publish
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Install Nodejs
uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/download-artifact@v1
with:
name: otk-x86_64-unknown-linux-musl
path: ./dist
- uses: actions/download-artifact@v1
with:
name: otk-x86_64-unknown-linux-gnu
path: ./dist
- run: ls -al ./dist
- name: Publish Release
uses: ./.github/actions/github-release
with:
files: "dist/*"
name: $(date +%Y-%m-%d)-${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}