Skip to content

CI build/upload fix

CI build/upload fix #8

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*"
permissions:
contents: write
jobs:
build-and-upload:
name: Build and upload
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
args: --verbose --release --target x86_64-pc-windows-msvc
- name: Build archive
shell: bash
run: |
binary_name="txcproxy"
dirname="$binary_name-${{ env.VERSION }}"
mkdir "$dirname"
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
7z a "$dirname.zip" "$dirname"
echo "ASSET=$dirname.zip" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.ASSET }}