version 1.2.5 #132
Workflow file for this run
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: Build Release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: create release tarball | |
run: | | |
mkdir wwwtech-${{ steps.get_version.outputs.VERSION }} | |
cp target/release/wwwtech_rs wwwtech-${{ steps.get_version.outputs.VERSION }}/ | |
cp -r static/ wwwtech-${{ steps.get_version.outputs.VERSION }}/static | |
tar -czf wwwtech-${{ steps.get_version.outputs.VERSION }}.tgz wwwtech-${{ steps.get_version.outputs.VERSION }}/ | |
- name: create github release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_version.outputs.VERSION }} | |
release_name: Release ${{ steps.get_version.outputs.VERSION }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./wwwtech-${{ steps.get_version.outputs.VERSION }}.tgz | |
asset_name: wwwtech-${{ steps.get_version.outputs.VERSION }}.tgz | |
asset_content_type: application/gzip |