Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed May 6, 2023
1 parent 6c2ba25 commit 6f13b9b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 47 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/Update.yml

This file was deleted.

45 changes: 42 additions & 3 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
sudo apt-get install -y git
- id: outputstep
run: |
echo "VERSION=$(git describe --tags)" >> "$GITHUB_OUTPUT"
echo "VERSION=$(git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/.r.*//g')" >> "$GITHUB_OUTPUT"
- name: Change Version
run: |
sed -i "s/\"version\":.*/\"version\": \"$(git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/.\(r[0-9]\)/\-\1/')\",/g" package.json
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
sudo apt-get install -y git
- id: outputstep
run: |
echo "VERSION=$(git describe --tags)" >> "$GITHUB_OUTPUT"
echo "VERSION=$(git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/.r.*//g')" >> "$GITHUB_OUTPUT"
- name: Change Version for Windows
run: |
sed -i "s/\"version\":.*/\"version\": \"$(git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/.r.*//g')\",/g" package.json
Expand Down Expand Up @@ -148,7 +148,6 @@ jobs:
sed -i '' "s/\"iconPath\":.*/\"iconPath\": \"icons\/tray.ico\",/g" src-tauri/tauri.conf.json
- name: Build and Package
run: |
echo ${{needs.change-version.outputs.version}}
export TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}"
export TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}"
pnpm tauri build --target ${{ matrix.target }}
Expand Down Expand Up @@ -355,3 +354,43 @@ jobs:
body_path: CHANGELOG
token: ${{ secrets.RELEASE_TOKEN }}
files: src-tauri/target/release/bundle/deb/*.deb
release-update:
needs: [build-for-macos, build-for-linux, build-for-windows]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout repository
uses: actions/checkout@v2
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/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/.r.*//g')" >> $GITHUB_ENV
echo "VERSION=$(git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/.r.*//g')"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: pnpm install
run: pnpm install

- name: Release updater file
run: pnpm run updater
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

- name: Upload Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG
tag_name: ${{ env.VERSION }}
token: ${{ secrets.RELEASE_TOKEN }}
files: update.json

0 comments on commit 6f13b9b

Please sign in to comment.