diff options
author | softprops <d.tangren@gmail.com> | 2021-02-20 23:45:53 -0500 |
---|---|---|
committer | softprops <d.tangren@gmail.com> | 2021-02-20 23:45:53 -0500 |
commit | d8dedbee2e2dba916624cc870ffdea89594ad011 (patch) | |
tree | 9f93e2ba02f7485c19038e682b5b933f0e38bda7 | |
parent | 226b5d6ace149ac4b447c3e5ba545803ea6e0e53 (diff) |
trigger on pushes to tags
-rw-r--r-- | .github/workflows/main.yml | 50 |
1 files changed, 26 insertions, 24 deletions
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 }} |