Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
feat: CI introduced
Browse files Browse the repository at this point in the history
  • Loading branch information
097115 committed Mar 7, 2023
1 parent 8f91084 commit 0fa8cc5
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CD

permissions:
contents: write

on:
push:
tags:
- "v*.*.*"

jobs:
publish:
name: Publishing ${{ matrix.build_target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_target: [linux]
include:
- build_target: linux
os: ubuntu-latest
artifact_suffix: linux-x86_64
target: x86_64-unknown-linux-musl
features: ''
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.target }}
profile: minimal
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libncursesw5
- uses: actions/checkout@v2
name: Checkout src
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Running cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Extract git tag
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
id: extract_tag
- name: Packaging assets
shell: bash
run: |
cd target/
ls -la
cd release
ls -la
tar czvf ircgrep-${{ matrix.target }}.tar.gz ircgrep*
shasum -a 256 ircgrep-${{ matrix.target }}.tar.gz > ircgrep-${{ matrix.target }}.sha256
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: target/release/ircgrep-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0fa8cc5

Please sign in to comment.