From d8dedbee2e2dba916624cc870ffdea89594ad011 Mon Sep 17 00:00:00 2001 From: softprops Date: Sat, 20 Feb 2021 23:45:53 -0500 Subject: trigger on pushes to tags --- .github/workflows/main.yml | 50 ++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9797347..e84d448 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,19 +4,21 @@ on: workflow_dispatch: push: paths-ignore: - - '*.md' + - "*.md" branches: - main - master + tags: + - "**" pull_request: paths-ignore: - - '*.md' + - "*.md" branches: - main - master env: - CARGO_TERM_COLOR: always + CARGO_TERM_COLOR: always jobs: codestyle: @@ -56,26 +58,26 @@ jobs: runs-on: ubuntu-latest steps: - - name: Setup Rust - uses: hecrj/setup-rust-action@v1 - with: - rust-version: ${{ matrix.rust }} - - name: Checkout - uses: actions/checkout@v1 - - name: Test - run: cargo test - - name: Coverage - if: matrix.rust == 'stable' - run: | - # tarpaulin knows how to extract data from ci - # ci services and GitHub actions is not one of them - # work around that by masquerading as travis - # https://github.com/xd009642/coveralls-api/blob/6da4ccd7c6eaf1df04cfd1e560362de70fa80605/src/lib.rs#L247-L262 - export TRAVIS_JOB_ID=${GITHUB_SHA} - export TRAVIS_PULL_REQUEST=false - export TRAVIS_BRANCH=${GITHUB_REF##*/} - cargo install cargo-tarpaulin - cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID + - name: Setup Rust + uses: hecrj/setup-rust-action@v1 + with: + rust-version: ${{ matrix.rust }} + - name: Checkout + uses: actions/checkout@v1 + - name: Test + run: cargo test + - name: Coverage + if: matrix.rust == 'stable' + run: | + # tarpaulin knows how to extract data from ci + # ci services and GitHub actions is not one of them + # work around that by masquerading as travis + # https://github.com/xd009642/coveralls-api/blob/6da4ccd7c6eaf1df04cfd1e560362de70fa80605/src/lib.rs#L247-L262 + export TRAVIS_JOB_ID=${GITHUB_SHA} + export TRAVIS_PULL_REQUEST=false + export TRAVIS_BRANCH=${GITHUB_REF##*/} + cargo install cargo-tarpaulin + cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID publish-docs: if: github.ref == 'refs/heads/master' @@ -106,4 +108,4 @@ jobs: - uses: actions/checkout@v1 - name: Publish shell: bash - run: cargo publish --token ${{ secrets.CRATES_TOKEN }} \ No newline at end of file + run: cargo publish --token ${{ secrets.CRATES_TOKEN }} -- cgit v1.2.3