Skip to content

Commit

Permalink
Fix rust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tazz4843 committed Apr 6, 2024
1 parent 69c92f6 commit 4b8760d
Showing 1 changed file with 53 additions and 53 deletions.
106 changes: 53 additions & 53 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
name: Rust

on:
push:
paths-ignore:
- "**.md"
branches:
- master
push:
paths-ignore:
- "**.md"
branches:
- master

env:
CARGO_TERM_COLOR: always
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: Cache Packages
uses: Swatinem/[email protected]

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Build
run: cargo build --release

- uses: actions/[email protected]
name: Upload a Build Artifact
with:
name: nbb
path: target/release/nbb

- name: Versions
id: version
run: |
echo "::set-output name=version::$(cargo metadata --format-version 1 --no-deps | jq .packages[0].version -r | sed 's/^/v/')"
echo "::set-output name=tag::$(git describe --tags)"
- name: Calculate SHA512 checksum
run: sha512sum target/release/nbb > nbb.sha512

- name: Release
uses: softprops/action-gh-release@v1
if: github.base_ref != 'master'
with:
tag_name: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }} - ${{ github.event.head_commit.message }}
draft: true
files: |
target/release/nbb
nbb.sha512
body: |
- ${{ github.event.head_commit.message }} ${{ github.sha }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Cache Packages
uses: Swatinem/[email protected]

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Build
run: cargo build --release

- uses: actions/[email protected]
name: Upload a Build Artifact
with:
name: nbb
path: target/release/nbb

- name: Versions
id: version
run: |
echo "::set-output name=version::$(cargo metadata --format-version 1 --no-deps | jq .packages[0].version -r | sed 's/^/v/')"
echo "::set-output name=tag::$(git describe --tags)"
- name: Calculate SHA512 checksum
run: sha512sum target/release/nbb > nbb.sha512

- name: Release
uses: softprops/action-gh-release@v1
if: github.base_ref != 'master'
with:
tag_name: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }} - ${{ github.event.head_commit.message }}
draft: true
files: |
target/release/nbb
nbb.sha512
body: |
- ${{ github.event.head_commit.message }} ${{ github.sha }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

0 comments on commit 4b8760d

Please sign in to comment.