Skip to content

Commit

Permalink
[ci skip] Test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwilding committed Dec 21, 2023
1 parent f0cc129 commit fc59a18
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/Release-Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
- name: "Checkout"
uses: actions/checkout@master

- name: "Extract Package Version"
id: cargo-version
run: |
version=v$(grep -oP 'version\s*=\s*"\K[0-9]+\.[0-9]+\.[0-9]+' dygma-layer-switcher/Cargo.toml | head -n 1)
echo "PACKAGE_VERSION=$version"
echo "PACKAGE_VERSION=$version" >> $GITHUB_ENV
- name: "Set up Rust"
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -27,26 +34,22 @@ jobs:
- name: "Build"
run: cargo build --release --target ${{ matrix.target }}

- name: "Extract Cargo Package Version"
id: cargo-version
run: echo "CARGO_VERSION=v$(grep -oP 'version\s*=\s*"\K[0-9]+\.[0-9]+\.[0-9]+' dygma-layer-switcher/Cargo.toml | head -n 1" >> $GITHUB_ENV

- name: "Create Git Tag"
run: |
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
git tag -a ${{ env.CARGO_VERSION }} -m "${{ env.CARGO_VERSION }}"
git push origin ${{ env.CARGO_VERSION }}
git tag -a ${{ env.PACKAGE_VERSION }} -m "${{ env.PACKAGE_VERSION }}"
git push origin ${{ env.PACKAGE_VERSION }}
- name: "Zip"
run: |
cp target/${{ matrix.target }}/release/dygma-layer-switcher.exe .
zip dls-${{ env.CARGO_VERSION }}-${{ matrix.target }}.zip dygma-layer-switcher.exe
zip dls-${{ env.PACKAGE_VERSION }}-${{ matrix.target }}.zip dygma-layer-switcher.exe
- name: "Create GitHub Release"
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.CARGO_VERSION }}
release_name: ${{ env.CARGO_VERSION }}
tag_name: ${{ env.PACKAGE_VERSION }}
release_name: ${{ env.PACKAGE_VERSION }}
files: |
dls-${{ env.CARGO_VERSION }}-${{ matrix.target }}.zip
dls-${{ env.PACKAGE_VERSION }}-${{ matrix.target }}.zip

0 comments on commit fc59a18

Please sign in to comment.