Skip to content

Bump crazy-max/ghaction-upx from 2.1.0 to 3.0.0 #44

Bump crazy-max/ghaction-upx from 2.1.0 to 3.0.0

Bump crazy-max/ghaction-upx from 2.1.0 to 3.0.0 #44

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup mold
run: |
wget https://github.com/rui314/mold/releases/download/v1.7.1/mold-1.7.1-x86_64-linux.tar.gz
tar xzf mold-1.7.1-x86_64-linux.tar.gz
ls -lhFA mold-1.7.1-x86_64-linux
sudo cp mold-1.7.1-x86_64-linux/bin/mold /usr/bin
- name: setup gdk-3 and alsa
run: |
sudo apt-get install -y libgdk-pixbuf2.0-dev libgtk-3-dev libasound2-dev libpulse-dev
- name: setup cache
uses: actions/cache@v3.0.11
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
~/.cargo/registry
~/.cargo/git
target/
# An explicit key for restoring and saving the cache
key: ${{ runner.os }}-build-nix-${{ github.ref_name }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-nix-
- name: build
run: cargo build --verbose --release
- name: compress executable
uses: crazy-max/ghaction-upx@v3.0.0
with:
version: v3.95
args: --best --lzma --color -v -o afx.upx
file: target/release/afx
- name: upload build artifacts
uses: actions/upload-artifact@v3.1.1
with:
# Artifact name
name: Release binaries
# A file, directory or wildcard pattern that describes what to upload
path: |
target/release/afx
afx.upx
# The desired behavior if no files are found using the provided path.
retention-days: 90
- name: test
run: cargo test --verbose --release
- name: release
if: ${{ github.ref == 'refs/heads/main' }}
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
# GitHub secret token
repo_token: "${{ secrets.GITHUB_TOKEN }}"
# Git tag (for automatic releases)
automatic_release_tag: latest
# Should this release be marked as a draft?
prerelease: true
# Release title (for automatic releases)
title: afx preview
# Assets to upload to the release
files: |
afx.upx
target/release/afx