Skip to content

release: 0.2.1

release: 0.2.1 #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@master
- name: Compile
id: compile
uses: rust-build/rust-build.action@v1.4.0
with:
RUSTTARGET: x86_64-unknown-linux-musl
UPLOAD_MODE: none
- name: Get tag
id: tag
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }}
release_name: "${{ github.event.repository.name }} ${{ env.TAG }}"
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.compile.outputs.BUILT_ARCHIVE }}
asset_name: "${{ github.event.repository.name }}-${{ env.TAG }}.zip"
asset_content_type: application/zip
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@master
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}