Skip to content

release

release #6

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag for the release (e.g., v1.0.0)'
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Configure Git
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
- name: Create and push tag
run: |
git tag ${{ github.event.inputs.tag_name }}
git push origin ${{ github.event.inputs.tag_name }}
- name: Install additional targets
run: |
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-pc-windows-gnu
- name: Install mingw-w64
run: sudo apt-get update && sudo apt-get install -y mingw-w64
- name: Build for Linux
run: cargo build --release --target x86_64-unknown-linux-gnu
- name: Build for Windows
run: cargo build --release --target x86_64-pc-windows-gnu
- name: Zip binaries
run: |
zip -j simple-task-timer-linux-x86_64.zip target/x86_64-unknown-linux-gnu/release/timer
zip -j simple-task-timer-windows-x86_64.zip target/x86_64-pc-windows-gnu/release/timer.exe
- name: Create release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag_name }}
name: ${{ github.event.inputs.tag_name }}
files: |
simple-task-timer-linux-x86_64.zip
simple-task-timer-windows-x86_64.zip