Skip to content

Commit

Permalink
add publish release action
Browse files Browse the repository at this point in the history
  • Loading branch information
davideaimar committed Jul 20, 2022
1 parent 762e957 commit c79ab9f
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

name: "publish"
on:
push:
branches:
- release

jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
env:
working-directory: .

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 16
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }}
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Install libpcap (ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: sudo apt-get install libpcap-dev
- name: Install libpcap (macos)
if: matrix.platform == 'macos-latest'
run: brew install libpcap
- name: Update cargo config to use Git CLI (windows)
if: matrix.platform == 'windows-latest'
run: Set-Content -Path $env:USERPROFILE\.cargo\config.toml "[net]`ngit-fetch-with-cli = true"
- name: Install WinPcap and WinPcap 4.1.2 Developer's Pack (windows)
if: matrix.platform == 'windows-latest'
run: |
cinst -y winpcap --version 4.1.3.20161116
(New-Object System.Net.WebClient).DownloadFile("https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip", "C:/WpdPack.zip")
Expand-Archive -LiteralPath C:/WpdPack.zip -DestinationPath C:/
echo "LIB=C:/WpdPack/Lib/x64" >> $env:GITHUB_ENV
- name: install app dependencies and build it
run: yarn && yarn build
working-directory: ${{env.working-directory}}/frontend
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: "App v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
projectPath: ${{env.working-directory}}
2 changes: 1 addition & 1 deletion .github/workflows/test-build-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install libpcap (macos)
if: matrix.platform == 'macos-latest'
run: brew install libpcap
- name: Update cargo config to use Git CLI
- name: Update cargo config to use Git CLI (windows)
if: matrix.platform == 'windows-latest'
run: Set-Content -Path $env:USERPROFILE\.cargo\config.toml "[net]`ngit-fetch-with-cli = true"
- name: Install WinPcap and WinPcap 4.1.2 Developer's Pack (windows)
Expand Down

0 comments on commit c79ab9f

Please sign in to comment.