Skip to content

Commit

Permalink
ci: add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
MR-Addict committed Jan 11, 2024
1 parent 7310a48 commit 1551bd4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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/rust-build.action@v1.4.4
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/*
6 changes: 5 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
<body>
<main>
<section>
<h1>Mdbook Embedify</h1>
<h1>
Mdbook Embedify
<img src="https://img.shields.io/crates/v/mdbook-embedify" alt="version" />
<img src="https://img.shields.io/crates/l/mdbook-embedify" alt="license" />
</h1>

<p>
This is a <a href="https://rust-lang.github.io/mdBook" target="_blank">mdbook</a> preprocessor plugin that
Expand Down

0 comments on commit 1551bd4

Please sign in to comment.