aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yaml
blob: 77f5f958c97c222c1266090638f256a3437b1321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Release ⚾

on:
  workflow_dispatch:
  push:
    tags:
      - "*"

jobs:
  release:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout 🛒
        uses: actions/checkout@v2

      - name: Toolchain 🧰
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly-2025-05-30
          components: rustfmt, clippy
          override: true

      - name: Build 🏗
        uses: actions-rs/cargo@v1
        continue-on-error: false
        with:
          command: build
          args: --release

      - name: Create Release 🏉
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          tag_name: ${{ github.ref }}
          release_name: ${{ github.ref }}
          draft: false
          prerelease: false

      - name: Upload Artifacts to Release 💎
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./target/release/para
          asset_name: para
          asset_content_type: application/x-elf # x-msdownload for Windows