Skip to content

Create release before building #10

Create release before building

Create release before building #10

Workflow file for this run

name: Publish release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release create "$TAG" \
--verify-tag \
--title="${TAG}" \
--notes-from-tag
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- create-release
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install Rust toolchain
run: rustup update
- name: Build
run: cargo build --profile ci
- name: Rename artifact
run: mv target/release/neophyte neophyte-linux
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release upload "$TAG" neophyte-linux
build-macos:
runs-on: macos-latest
timeout-minutes: 10
needs:
- create-release
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install Rust toolchain
run: rustup update
- name: Build
run: cargo build --profile ci
- name: Rename artifact
run: mv target/release/neophyte neophyte-macos
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release upload "$TAG" neophyte-macos
build-windows:
runs-on: windows-latest
timeout-minutes: 10
needs:
- create-release
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install Rust toolchain
run: rustup update
- name: Build
run: cargo build --profile ci
- name: Rename artifact
run: mv target/release/neophyte.exe neophyte-windows.exe
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release upload "$TAG" neophyte-windows.exe