refactor: 将项目名称从 "saladict" 修改为 "Saladict" #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Package | |
on: | |
push: | |
branches: [master] | |
tags-ignore: [updater] | |
permissions: write-all | |
env: | |
VITE_UMAMI_SCRIPT_URL: ${{ secrets.VITE_UMAMI_SCRIPT_URL }} | |
VITE_UMAMI_DATA_WEBSITE_ID: ${{ secrets.VITE_UMAMI_DATA_WEBSITE_ID }} | |
jobs: | |
change-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.outputstep.outputs.VERSION }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install git | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git | |
- id: outputstep | |
run: | | |
echo "VERSION=$(git describe --tags | sed 's/-[0-9]*-.*//g')" >> "$GITHUB_OUTPUT" | |
- name: Change Version for Windows | |
run: | | |
sed -i "s/\"version\":.*/\"version\": \"$(git describe --tags | sed 's/-[0-9]*-.*//g')\",/g" package.json | |
sed -i "s/\"version\":.*/\"version\": \"$(git describe --tags | sed 's/-[0-9]*-.*//g')\"/g" src-tauri/tauri.conf.json | |
sed -i "s/version = \"0.0.0\"/version = \"$(git describe --tags | sed 's/-[0-9]*-.*//g')\"/g" src-tauri/Cargo.toml | |
echo $(git describe --tags | sed 's/-[0-9]*-.*//g') | |
- name: Upload Artifacts for Windows | |
uses: actions/upload-artifact@v4 | |
with: | |
name: source | |
path: ./* | |
include-hidden-files: true | |
if-no-files-found: error | |
build-extension: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build Popclipext | |
run: | | |
cd .scripts/popclip | |
bash ./build.sh | |
cd ../.. | |
- name: Build SnipDo | |
run: | | |
cd .scripts/snipdo | |
bash ./build.sh | |
cd ../.. | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Saladict.popclipextz | |
path: .scripts/popclip/Saladict.popclipextz | |
if-no-files-found: error | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Saladict.pbar | |
path: .scripts/snipdo/Saladict.pbar | |
if-no-files-found: error | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: .scripts/popclip/Saladict.popclipextz | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: .scripts/snipdo/Saladict.pbar | |
build-for-macos: | |
needs: change-version | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest] | |
target: [aarch64-apple-darwin, x86_64-apple-darwin] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: source | |
- name: Setup Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: Install Rust Stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: install dependencies | |
run: | | |
rustup target add ${{ matrix.target }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install the Apple certificate | |
env: | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
run: | | |
# create variables | |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate from secrets | |
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | |
# create temporary keychain | |
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# import certificate to keychain | |
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Code Format | |
run: pnpm prettier --write . | |
- name: Build and Package | |
run: | | |
export TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}" | |
export TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}" | |
pnpm tauri build --target ${{ matrix.target }} | |
sudo chmod +x src-tauri/resources/* | |
chmod +x src-tauri/resources/* | |
- name: Sign and Notarize | |
env: | |
SIGN_APP: ${{ secrets.SIGN_APP }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
TEAM_ID: ${{ secrets.TEAM_ID }} | |
APPLE_APP_PASS: ${{ secrets.APPLE_APP_PASS }} | |
run: | | |
# Set paths | |
app_path="src-tauri/target/${{ matrix.target }}/release/bundle/macos/Saladict.app" | |
dmg_path="src-tauri/target/${{ matrix.target }}/release/bundle/dmg/Saladict_${{needs.change-version.outputs.version}}_${{ contains(matrix.target, 'aarch64') && 'aarch64' || 'x86_64' }}.dmg" | |
ocr_arm64_path="${app_path}/Contents/Resources/resources/ocr-aarch64-apple-darwin" | |
ocr_x86_path="${app_path}/Contents/Resources/resources/ocr-x86_64-apple-darwin" | |
# Sign OCR binaries | |
echo "Signing OCR binary..." | |
codesign --force -s "$SIGN_APP" --options runtime "${ocr_arm64_path}" | |
codesign --force -s "$SIGN_APP" --options runtime "${ocr_x86_path}" | |
# Sign main application | |
echo "Signing application..." | |
codesign --deep --force -s "$SIGN_APP" --options runtime "${app_path}" | |
# Submit app for notarization | |
echo "Submitting app for notarization..." | |
# First compress the app | |
ditto -c -k --keepParent "${app_path}" "app.zip" | |
# Submit for notarization | |
xcrun notarytool submit "app.zip" \ | |
--apple-id "$APPLE_ID" \ | |
--team-id "$TEAM_ID" \ | |
--password "$APPLE_APP_PASS" \ | |
--wait | |
# Remove the temporary zip | |
rm "app.zip" | |
# Staple the app | |
echo "Stapling notarization ticket to app..." | |
xcrun stapler staple "${app_path}" | |
# verify notarization | |
echo "Verifying notarization status..." | |
# verify app is safe | |
spctl --assess --verbose=4 "${app_path}" | |
# verify notarization ticket is attached | |
xcrun stapler validate "${app_path}" | |
# Create temporary directory for DMG | |
echo "Creating temporary directory for DMG..." | |
tmp_dir=$(mktemp -d) | |
cp -r "${app_path}" "${tmp_dir}/" | |
# Create Applications symlink | |
echo "Creating Applications folder symlink..." | |
ln -s /Applications "${tmp_dir}/Applications" | |
# Remove unsigned DMG | |
rm -f "${dmg_path}" | |
# Create DMG | |
echo "Creating DMG with signed app..." | |
hdiutil create -volname "Saladict" -srcfolder "${tmp_dir}" -ov -format UDZO "${dmg_path}" | |
echo "DMG creation completed" | |
- name: Change File Name | |
if: matrix.target == 'aarch64-apple-darwin' | |
env: | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
run: | | |
cd src-tauri/target/aarch64-apple-darwin/release/bundle/macos | |
rm -f Saladict.app.tar.gz Saladict.app.tar.gz.sig | |
tar -czf Saladict_${{needs.change-version.outputs.version}}_aarch64.app.tar.gz Saladict.app | |
pnpm tauri signer sign -k "$TAURI_PRIVATE_KEY" -p "$TAURI_KEY_PASSWORD" "$PWD/Saladict_${{needs.change-version.outputs.version}}_aarch64.app.tar.gz" | |
- name: Change File Name | |
if: matrix.target == 'x86_64-apple-darwin' | |
env: | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
run: | | |
cd src-tauri/target/x86_64-apple-darwin/release/bundle/macos | |
rm -f Saladict.app.tar.gz Saladict.app.tar.gz.sig | |
tar -czf Saladict_${{needs.change-version.outputs.version}}_x64.app.tar.gz Saladict.app | |
pnpm tauri signer sign -k "$TAURI_PRIVATE_KEY" -p "$TAURI_KEY_PASSWORD" "$PWD/Saladict_${{needs.change-version.outputs.version}}_x64.app.tar.gz" | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos_${{ matrix.target }}_dmg | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg | |
if-no-files-found: error | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos_${{ matrix.target }}_updater | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/macos/*.app* | |
if-no-files-found: error | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: src-tauri/target/${{ matrix.target }}/release/bundle/macos/*.app* | |
build-for-windows: | |
needs: change-version | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest] | |
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc, aarch64-pc-windows-msvc] | |
include: | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
toolchain: stable-x86_64-pc-windows-msvc | |
- os: windows-latest | |
target: i686-pc-windows-msvc | |
toolchain: stable-i686-pc-windows-msvc | |
- os: windows-latest | |
target: aarch64-pc-windows-msvc | |
toolchain: stable-aarch64-pc-windows-msvc | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: source | |
- name: Setup Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: Install Rust Stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: install dependencies | |
run: | | |
rustup target add ${{ matrix.target }} | |
rustup toolchain install --force-non-host ${{ matrix.toolchain }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Code Format | |
run: pnpm prettier --write . | |
- name: Build and Package | |
run: | | |
$env:TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}" | |
$env:TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}" | |
pnpm tauri build -b nsis,updater --target ${{ matrix.target }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows_${{ matrix.target }} | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup* | |
if-no-files-found: error | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup* | |
build-for-windows-fix-runtime: | |
needs: change-version | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest] | |
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc, aarch64-pc-windows-msvc] | |
include: | |
- os: windows-latest | |
arch: x64 | |
target: x86_64-pc-windows-msvc | |
toolchain: stable-x86_64-pc-windows-msvc | |
- os: windows-latest | |
arch: x86 | |
target: i686-pc-windows-msvc | |
toolchain: stable-i686-pc-windows-msvc | |
- os: windows-latest | |
arch: arm64 | |
target: aarch64-pc-windows-msvc | |
toolchain: stable-aarch64-pc-windows-msvc | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: source | |
- name: Setup Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: Install Rust Stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: install dependencies | |
run: | | |
rustup target add ${{ matrix.target }} | |
rustup toolchain install --force-non-host ${{ matrix.toolchain }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Code Format | |
run: pnpm prettier --write . | |
- name: Download WebView2 Runtime | |
run: | | |
invoke-webrequest -uri https://github.com/westinyang/WebView2RuntimeArchive/releases/download/109.0.1518.78/Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -outfile Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab | |
Expand .\Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -F:* ./src-tauri | |
Remove-Item .\src-tauri\tauri.windows.conf.json | |
Rename-Item .\src-tauri\webview.${{ matrix.arch }}.json tauri.windows.conf.json | |
- name: Build and Package | |
run: | | |
$env:TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}" | |
$env:TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}" | |
pnpm tauri build -b nsis,updater --target ${{ matrix.target }} | |
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.exe Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.exe | |
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.nsis.zip Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.nsis.zip | |
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.nsis.zip.sig Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.nsis.zip.sig | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows_fix_webview_runtime_${{ matrix.target }} | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup* | |
if-no-files-found: error | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup* | |
build-for-linux: | |
needs: change-version | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] | |
target: | |
[ | |
x86_64-unknown-linux-gnu, | |
i686-unknown-linux-gnu, | |
aarch64-unknown-linux-gnu, | |
armv7-unknown-linux-gnueabihf, | |
] | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
toolchain: stable-x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: i686-unknown-linux-gnu | |
toolchain: stable-i686-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
toolchain: stable-aarch64-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: armv7-unknown-linux-gnueabihf | |
toolchain: stable-armv7-unknown-linux-gnueabihf | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: source | |
- name: Build for Linux | |
uses: ./.github/actions/build-for-linux | |
env: | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
target: ${{ matrix.target }} | |
toolchain: ${{ matrix.toolchain }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux_${{ matrix.target }}_deb | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb | |
if-no-files-found: error | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux_${{ matrix.target }}_rpm | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm | |
if-no-files-found: error | |
- name: Upload Artifacts | |
if: matrix.target == 'x86_64-unknown-linux-gnu' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux_${{ matrix.target }}_appimage | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage* | |
if-no-files-found: error | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') && matrix.target == 'x86_64-unknown-linux-gnu' | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage* | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm | |
trigger-docs-update: | |
needs: [build-for-macos, build-for-windows, build-for-linux] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Trigger update | |
run: | | |
curl -X POST https://api.github.com/repos/allentown521/saladict-desktop-docs/dispatches \ | |
-H "Accept: application/vnd.github.everest-preview+json" \ | |
-H "Authorization: token ${{ secrets.TOKEN }}" \ | |
-d '{"event_type": "plugins-updated"}' | |
release-update: | |
needs: [build-for-macos, build-for-windows, build-for-linux, build-for-windows-fix-runtime] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install git | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git curl | |
- name: Get Tag Name | |
run: | | |
echo "VERSION=$(git describe --tags | sed 's/-[0-9]*-.*//g')" >> $GITHUB_ENV | |
echo "VERSION=$(git describe --tags | sed 's/-[0-9]*-.*//g')" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: pnpm install | |
run: pnpm install | |
- name: Release updater file | |
run: | | |
pnpm run updater | |
pnpm run updater:fixRuntime | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: ${{env.VERSION}} | |
tag_name: updater | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
update.json | |
update-fix-runtime.json | |
homebrew: | |
name: Update Homebrew cask | |
needs: build-for-macos | |
runs-on: macos-latest | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get Tag Name | |
run: | | |
echo "VERSION=$(git describe --tags | sed 's/-[0-9]*-.*//g')" >> $GITHUB_ENV | |
echo "VERSION=$(git describe --tags | sed 's/-[0-9]*-.*//g')" | |
- name: Set up Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Set up Git | |
run: | | |
# sudo apt-get install git -y | |
git config --global user.email [email protected] | |
git config --global user.name saladict-app | |
- name: Update Homebrew cask | |
env: | |
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.TOKEN }} | |
run: | | |
brew tap allentown521/homebrew-saladict | |
brew update | |
brew bump-cask-pr saladict --version ${{ env.VERSION }} --no-browse | |
winget: | |
name: Update WinGet Package | |
needs: build-for-windows | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install git | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git | |
- name: Get Tag Name | |
run: | | |
echo "VERSION=$(git describe --tags | sed 's/-[0-9]*-.*//g')" >> $GITHUB_ENV | |
echo "VERSION=$(git describe --tags | sed 's/-[0-9]*-.*//g')" | |
- name: Upload WinGet | |
if: startsWith(github.ref, 'refs/tags') | |
uses: vedantmgoyal2009/winget-releaser@v2 | |
with: | |
identifier: allentown521.Saladict | |
version: ${{env.VERSION}} | |
installers-regex: '\.exe$' | |
token: ${{ secrets.TOKEN }} | |
continue-on-error: true |