Skip to content

fix e2e test

fix e2e test #15

Workflow file for this run

name: Release
# https://eugene-babichenko.github.io/blog/2020/05/09/github-actions-cross-platform-auto-releases/
# https://mateuscosta.me/rust-releases-with-github-actions
on:
push:
tags:
- 'v[0-9]+.*'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
create_release:
name: Create release
runs-on: ubuntu-latest
# Note this. We are going to use that in further jobs.
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Set variables
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body: |
This is a new release of Pomsky. See what's new in the [changelog](https://github.com/pomsky-lang/pomsky/blob/${{ steps.vars.outputs.tag }}/CHANGELOG.md).
### Installation
If you're running on Linux, macOS or Windows, you can use the binaries below.
On Arch Linux, you can install `pomsky-bin` from the AUR with
```shell
$ yay -S pomsky-bin
```
You can also build Pomsky with Cargo, Rusts package manager. To install the Rust toolchain, see the [installation manual](https://www.rust-lang.org/tools/install). Then run
```shell
$ cargo install pomsky-bin
```
You might have to add the `.cargo/bin` folder to your `PATH` afterwards.
Please file issues if you run into any problems or have suggestions.
release_assets:
name: Release assets
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
file_ending: ''
- os: macos-latest
platform: macos
file_ending: ''
- os: windows-latest
platform: windows
file_ending: '.exe'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Print information
run: |
rustup show active-toolchain
rustc --version
cargo tree
- name: Set variables
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Install build dependencies
run: cargo install cargo-auditable
- name: Build project
run: cargo auditable build --profile dist --locked
- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: pomsky_${{ matrix.platform }}_${{ steps.vars.outputs.tag }}${{ matrix.file_ending }}
asset_path: target/dist/pomsky${{ matrix.file_ending }}
asset_content_type: application/octet-stream