Skip to content

Commit

Permalink
working?
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeswenson committed May 3, 2020
1 parent 427a466 commit 6359363
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 4 deletions.
1 change: 0 additions & 1 deletion .ci/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash

: "${OS_NAME:=osx}"
: "${FEATURE_BUILD:=default}"

CARGO_ARGS=()
Expand Down
17 changes: 17 additions & 0 deletions .ci/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

: "${FEATURE_BUILD:=default}"

CARGO_ARGS=()

function set_cargo_args() {
if [ "$FEATURE_BUILD" != "default" ]; then
CARGO_ARGS+=(--no-default-features)
fi
}

set_cargo_args

set -x

cargo test --verbose --locked "${CARGO_ARGS[@]}"
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install dependencies for default features on linux
if: matrix.os == 'ubuntu-latest' && matrix.feature_build == 'default'
if: matrix.feature_build == 'default'
run: sudo apt-get install libdbus-1-dev libxcb-shape0 libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xfixes0
- name: Build
run: .ci/build.sh
- name: Run tests
run: cargo test --verbose
run: .ci/test.sh
build-mac:
runs-on: macos-10.15
env:
Expand All @@ -46,4 +46,4 @@ jobs:
- name: Build
run: .ci/build.sh
- name: Run tests
run: cargo test --verbose
run: .ci/test.sh
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
tags:
- '*'

name: Build, Release, Publish to GH and Cargo

jobs:
build:
name: Release Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
run: |
cargo build --release --locked --verbose
- 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: true
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 }} # 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: ./my-artifact.zip
asset_name: my-artifact.zip
asset_content_type: application/zip

0 comments on commit 6359363

Please sign in to comment.