Skip to content

ci: add release action #6

ci: add release action

ci: add release action #6

Workflow file for this run

name: release
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
build:
name: ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-pc-windows-gnu
- target: x86_64-unknown-linux-musl
- target: x86_64-apple-darwin
steps:
- uses: actions/checkout@master
- uses: rust-build/[email protected]
id: compile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ARCHIVE_NAME: mdbook-embedify-${{ github.ref }}-${{ matrix.target }}.zip
RUSTTARGET: ${{ matrix.target }}
UPLOAD_MODE: none
- uses: actions/upload-artifact@v3
with:
name: bin
path: ${{ steps.compile.outputs.BUILT_ARCHIVE }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- name: Install packages
run: sudo apt-get update && sudo apt-get install -y unzip upx-ucl
- name: Test files
run: |
unzip -u bin/*.zip -d bin && rm bin/*.zip
upx --best bin/*
ls -l bin/*