Skip to content

chore: Prepare for the release v1.6.4 #65

chore: Prepare for the release v1.6.4

chore: Prepare for the release v1.6.4 #65

Workflow file for this run

name: Continuous Deployment
on:
push:
tags:
- "v*.*.*"
jobs:
publish-github:
name: Publish on GitHub
runs-on: ubuntu-22.04
strategy:
matrix:
TARGET: [ x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl ]
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set the release version
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Install X11 dependencies
run: |
sudo apt-get update
sudo apt-get install --allow-unauthenticated -y -qq \
libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev musl-tools
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{matrix.TARGET}}
override: true
- name: Build
run: cargo build --release --locked --target ${{ matrix.TARGET }}
- name: Prepare assets
run: |
mkdir assets
cp -t assets/ target/${{matrix.TARGET}}/release/kmon && strip -s assets/kmon
cp -t assets/ LICENSE README.md CHANGELOG.md
mv target/${{matrix.TARGET}}/man .
cp -t assets/ --parents man/kmon.8
mv target/${{matrix.TARGET}}/completions .
cp -t assets/ --parents completions/*
mv assets/ kmon-${{env.RELEASE_VERSION}}/
tar -czvf kmon-${{env.RELEASE_VERSION}}-${{matrix.TARGET}}.tar.gz \
kmon-${{env.RELEASE_VERSION}}/
sha512sum kmon-${{env.RELEASE_VERSION}}-${{matrix.TARGET}}.tar.gz \
> kmon-${{env.RELEASE_VERSION}}-${{matrix.TARGET}}.tar.gz.sha512
echo "${{ secrets.GPG_RELEASE_KEY }}" | base64 --decode > private.key
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --pinentry-mode=loopback \
--passphrase-fd 0 --import private.key
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --pinentry-mode=loopback \
--passphrase-fd 0 --detach-sign \
kmon-${{env.RELEASE_VERSION}}-${{matrix.TARGET}}.tar.gz
- name: Upload assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: kmon-${{ env.RELEASE_VERSION }}-${{ matrix.TARGET }}.tar.gz*
file_glob: true
overwrite: true
tag: ${{ github.ref }}
body: |
<a href="https://github.com/orhun/kmon"><img src="https://user-images.githubusercontent.com/24392180/73918056-d5c45500-48d1-11ea-8d18-9943827ab2ed.png" width="400"></a>
See [**changelog**](CHANGELOG.md) for release notes.
publish-crates-io:
name: Publish on crates.io
needs: publish-github
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Install X11 dependencies
run: |
sudo apt-get update
sudo apt-get install --allow-unauthenticated -y -qq \
libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
- name: Publish
uses: actions-rs/cargo@v1
with:
command: publish
args: --locked --token ${{ secrets.CARGO_TOKEN }}