Bump h2 from 0.3.17 to 0.3.24 #70
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: Rust | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Test rust ${{ matrix.rust }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, 'windows-latest'] | |
rust: [stable] | |
steps: | |
- uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: ${{ matrix.rust }} | |
components: rustfmt | |
- uses: actions/checkout@v1 | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Build release | |
run: cargo build --verbose --release | |
- name: Upload unix binary | |
uses: actions/upload-artifact@v1 | |
if: matrix.os != 'windows-latest' | |
with: | |
name: neocal-${{ matrix.os }} | |
path: target/release/neocal | |
- name: Upload windows binary | |
uses: actions/upload-artifact@v1 | |
if: matrix.os == 'windows-latest' | |
with: | |
name: neocal-${{ matrix.os }} | |
path: target/release/neocal.exe | |
release: | |
name: Release | |
needs: build | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: neocal-ubuntu-latest | |
path: dist/neocal-ubuntu-latest | |
- uses: actions/download-artifact@v1 | |
with: | |
name: neocal-macOS-latest | |
path: dist/neocal-macOS-latest | |
- uses: actions/download-artifact@v1 | |
with: | |
name: neocal-windows-latest | |
path: dist/neocal-windows-latest | |
- name: List release files | |
run: find dist/ | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1.0.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload linux release asset | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./dist/neocal-ubuntu-latest/neocal | |
asset_name: neocal-linux-x86_64 | |
asset_content_type: application/x-elf | |
- name: Upload macos release asset | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./dist/neocal-macOS-latest/neocal | |
asset_name: neocal-darwin-x86_64 | |
asset_content_type: application/x-mach-binary | |
- name: Upload windows release asset | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./dist/neocal-windows-latest/neocal.exe | |
asset_name: neocal-windows-x86_64.exe | |
asset_content_type: application/vnd.microsoft.portable-executable |