Merge pull request #24 from theonekingboo/betterdocumentation #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Draft | |
on: | |
push: | |
branches: [master] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
publish-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update && \ | |
sudo apt-get install -y --no-install-recommends libgtk-3-dev | |
- name: Install nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2021-04-25 | |
override: true | |
- name: Set environment variables | |
run: | | |
echo "VERSION=$(cat Cargo.toml | grep version | head -1 | sed 's/[\",(version = )]//g')" >> $GITHUB_ENV | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Compress release | |
env: | |
GZIP: -9 | |
run: | | |
cd target/release && \ | |
tar czvf smmdb-client-linux.tar.gz smmdb | |
- name: Update Draft Release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ github.sha }} | |
tag: ${{ github.sha }} | |
name: "SMMDB Client ${{ env.VERSION }} [Run#: ${{ github.run_number }}]" | |
artifacts: "target/release/smmdb-client-linux.tar.gz" | |
draft: true | |
allowUpdates: true | |
publish-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2021-04-25 | |
override: true | |
- name: Set environment variables | |
run: | | |
echo "VERSION=$(cat Cargo.toml | grep version | head -1 | sed 's/[\",(version = )]//g')" >> $GITHUB_ENV | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Compress release | |
env: | |
GZIP: -9 | |
run: | | |
cd target/release && \ | |
tar czvf smmdb-client-windows.tar.gz smmdb.exe | |
shell: bash | |
- name: Update Draft Release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ github.sha }} | |
tag: ${{ github.sha }} | |
name: "SMMDB Client ${{ env.VERSION }} [Run#: ${{ github.run_number }}]" | |
artifacts: "target/release/smmdb-client-windows.tar.gz" | |
draft: true | |
allowUpdates: true | |
publish-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2021-04-25 | |
override: true | |
- name: Set environment variables | |
run: | | |
echo "VERSION=$(cat Cargo.toml | grep version | head -1 | sed 's/[\",(version = )]//g')" >> $GITHUB_ENV | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Compress release | |
env: | |
GZIP: -9 | |
run: | | |
cd target/release && \ | |
tar czvf smmdb-client-macos.tar.gz smmdb | |
- name: Update Draft Release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ github.sha }} | |
tag: ${{ github.sha }} | |
name: "SMMDB Client ${{ env.VERSION }} [Run#: ${{ github.run_number }}]" | |
artifacts: "target/release/smmdb-client-macos.tar.gz" | |
draft: true | |
allowUpdates: true |