Skip to content

chore(gh-actions): consistent asset names #41

chore(gh-actions): consistent asset names

chore(gh-actions): consistent asset names #41

Workflow file for this run

name: release
on:
push:
tags:
- v[0-9].[0-9]+.[0-9]+
- v[0-9].[0-9]+.[0-9]+-rc[0-9]+
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
# - name: set up rust
# uses: dtolnay/rust-toolchain@stable
- name: build
run: |
make build
- name: determine tag type
id: tag_type
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$ ]]; then
echo "tag_type=PRE_RELEASE_TAG" >> $GITHUB_OUTPUT
elif [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "tag_type=RELEASE_TAG" >> $GITHUB_OUTPUT
else
echo "tag_type=INVALID_TAG" >> $GITHUB_OUTPUT
fi
- name: upload binaries to release
if: steps.tag_type.outputs.tag_type != 'INVALID_TAG'
uses: svenstaro/upload-release-action@v2
with:
file: target/release/paddler
asset_name: paddler-bin-linux-amd64
overwrite: true
prerelease: ${{ steps.tag_type.outputs.tag_type == 'PRE_RELEASE_TAG' }}
tag: ${{ github.ref }}