Merge pull request #2 from oniony/support-colour #53
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: Release | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Tag | |
id: tag | |
uses: hennejg/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release_branches: main | |
- name: Version | |
run: | | |
sed -i "s/^version.*/version = \"${{ steps.tag.outputs.new_version }}\"/" Cargo.toml | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Test | |
working-directory: ./tests | |
run: | | |
./run --release | |
- name: Archive | |
run: | | |
mkdir lbdt-${{ github.ref_name}} | |
mv LICENSE README.md target/release/lbdt lbdt-${{ github.ref_name }} | |
tar -czf lbdt-${{ github.ref_name }}.tgz lbdt-${{ github.ref_name }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ steps.tag.outputs.new_tag }} | |
tag_name: ${{ steps.tag.outputs.new_tag }} | |
generate_release_notes: true | |
files: lbdt-${{ github.ref_name }}.tgz |