Skip to content

Commit

Permalink
fix: ci: Fix version command reported wrong version (#58)
Browse files Browse the repository at this point in the history
Currently, Conventional Changelog Action runs after the packaging the release assets, the assets are built without the bumped version, thus distrod version reports the old wrong version instead of the bumped version. In addition, the action commits the built assets, which is unintended.

This PR fixes that problem by fixing the execution order of Conventional Changelog Action.
  • Loading branch information
nullpo-head committed Jul 3, 2022
1 parent e4aa1ea commit fd9bbdc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/cd.yaml
Expand Up @@ -47,19 +47,6 @@ jobs:
zip -r "distrod_wsl_launcher-${{ env.ARCH_NAME }}.zip" "distrod_wsl_launcher-${{ env.ARCH_NAME }}"
mv "distrod_wsl_launcher-${{ env.ARCH_NAME }}.zip" assets/
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.github_token }}
version-file: ./distrod/distrod/Cargo.toml,./distrod/distrod-exec/Cargo.toml,./distrod/distrod_wsl_launcher/Cargo.toml
version-path: package.version
skip-on-empty: false
git-user-name: "github-actions[bot]"
git-user-email: "41898282+github-actions[bot]@users.noreply.github.com"
release-count: "0"
skip-version-file: ${{ github.event.inputs.skips_version_bump == 'yes' }}

- name: Upload Binaries to Release
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -116,7 +103,7 @@ jobs:
name: Build distrod Linux command
runs-on: ubuntu-latest

needs: [build-portproxy-exe]
needs: [build-portproxy-exe, bump-version]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -167,6 +154,24 @@ jobs:
path: distrod_root.tar.gz
if-no-files-found: error

bump-version:
name: Bump the version
runs-on: ubuntu-latest

steps:
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.github_token }}
version-file: ./distrod/distrod/Cargo.toml,./distrod/distrod-exec/Cargo.toml,./distrod/distrod_wsl_launcher/Cargo.toml
version-path: package.version
skip-on-empty: false
git-user-name: "github-actions[bot]"
git-user-email: "41898282+github-actions[bot]@users.noreply.github.com"
release-count: "0"
skip-version-file: ${{ github.event.inputs.skips_version_bump == 'yes' }}

build-portproxy-exe:
name: Build portproxy.exe
runs-on: windows-latest
Expand Down
6 changes: 3 additions & 3 deletions distrod/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed distrod_wsl_launcher-x86_64/distrod_wsl_launcher.exe
Binary file not shown.

0 comments on commit fd9bbdc

Please sign in to comment.