Skip to content

Commit

Permalink
chore(github.actions): attempt to fix publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
vnphanquang committed Mar 4, 2022
1 parent 9322c2f commit 5dc0daf
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ on: workflow_dispatch
jobs:
publish:
name: ipp_encoder Publication
environment: production
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
path: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Publish
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
working-directory: ./encoder
continue-on-error: false
- name: Log Toolchain Information
run: |
rustc --version
rustfmt --version
rustup --version
cargo --version
- name: Bump Version & Tag
id: tag_version
uses: mathieudutour/[email protected]
Expand All @@ -29,6 +30,18 @@ jobs:
default_bump: patch
tag_prefix: v
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Set New Version in Cargo.toml
uses: ciiiii/[email protected]
with:
file: "./encoder/Cargo.toml"
key: "package.version"
value: "${{ steps.tag_version.outputs.new_version }}"
- name: Publish
uses: actions-rs/cargo@v1
with:
command: publish
args: --token "${{ secrets.CRATES_IO_TOKEN }}" --manifest-path "./encoder/Cargo.toml" --allow-dirty
continue-on-error: false
- name: Create a Github Release
uses: ncipollo/release-action@v1
with:
Expand All @@ -44,8 +57,8 @@ jobs:
- name: Create Pull Request for Changelog
uses: peter-evans/create-pull-request@v3
with:
commit-message: format('CHANGELOG update for release {0}', {{ steps.tag_version.outputs.new_tag }})
title: format('CHANGELOG update for release {0}', {{ steps.tag_version.outputs.new_tag }})
branch: format('changelog/{0}', {{ steps.tag_version.outputs.new_tag }})
commit-message: ${{ format('CHANGELOG update for release {0}', steps.tag_version.outputs.new_tag) }}
title: ${{ format('CHANGELOG update for release {0}', steps.tag_version.outputs.new_tag) }}
branch: ${{ format('changelog/{0}', steps.tag_version.outputs.new_tag) }}
base: main
reviewers: vnphanquang
16 changes: 8 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macOS-latest]
os: [ubuntu-latest, windows-2019, macOS-latest]
rust: [stable]
include:
- rust: stable
Expand All @@ -39,15 +39,15 @@ jobs:
command: fmt
args: --all -- --check
continue-on-error: ${{ matrix.can-fail }}
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D clippy::all
continue-on-error: ${{ matrix.can-fail }}
- name: Test Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
# only build ipp_encoder for now since astro-dnssd is failing currently for ipp_server on ubuntu
args: --release --all-features --manifest-path "./encoder/Cargo.toml"
continue-on-error: ${{ matrix.can-fail }}
- name: Clippy
run: cargo clippy -- -D clippy::all
# only clippy ipp_encoder for now since astro-dnssd is failing currently for ipp_server on ubuntu
working-directory: ./encoder
continue-on-error: ${{ matrix.can-fail }}

0 comments on commit 5dc0daf

Please sign in to comment.