Skip to content

Commit

Permalink
build(github_action): release to my repo
Browse files Browse the repository at this point in the history
  • Loading branch information
schaepher committed Sep 18, 2024
1 parent d67cf9b commit 25e55a6
Show file tree
Hide file tree
Showing 5 changed files with 2,595 additions and 2,091 deletions.
53 changes: 39 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,74 +7,99 @@ on:

jobs:
test:
runs-on: [ self-hosted, macOS, ARM64 ]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
brew update
brew install just nodejs flutter cocoapods pnpm lefthook go
- name: Test
run: just test
build-macos-amd64:
needs: test
runs-on: [ self-hosted, macOS, X64 ]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
brew update
brew install just nodejs flutter cocoapods pnpm lefthook go create-dmg
- name: Build
run: just release darwin-amd64
- name: Deploy nightly release amd64
uses: WebFreak001/[email protected]
with:
upload_url: https://uploads.github.com/repos/Wox-launcher/Wox/releases/127182165/assets{?name,label}
release_id: 127182165
upload_url: https://uploads.github.com/repos/schaepher/Wox/releases/175128313/assets{?name,label}
release_id: 175128313
asset_path: ./Release/wox-mac-amd64.dmg # path to archive to upload
asset_name: wox-mac-amd64-$$.dmg # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/x-elf # required by GitHub API
max_releases: 1
build-macos-arm64:
needs: test
runs-on: [ self-hosted, macOS, ARM64 ]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
brew update
brew install just nodejs flutter cocoapods pnpm lefthook go create-dmg
- name: Build
run: just release darwin-arm64
- name: Deploy nightly release arm64
uses: WebFreak001/[email protected]
with:
upload_url: https://uploads.github.com/repos/Wox-launcher/Wox/releases/127182165/assets{?name,label}
release_id: 127182165
upload_url: https://uploads.github.com/repos/schaepher/Wox/releases/175128313/assets{?name,label}
release_id: 175128313
asset_path: ./Release/wox-mac-arm64.dmg # path to archive to upload
asset_name: wox-mac-arm64-$$.dmg # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/x-elf # required by GitHub API
max_releases: 1
build-windows:
needs: test
runs-on: [ self-hosted, Windows ]
runs-on: windows-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/checkout@v3
- name: install dependencies
run: |
choco install just nodejs flutter pnpm go upx
- name: Build
run: just release windows
run: |
$Env:PATH += ";C:\tools\flutter\bin"
just release windows
- name: Deploy nightly release
uses: WebFreak001/[email protected]
with:
upload_url: https://uploads.github.com/repos/Wox-launcher/Wox/releases/127182165/assets{?name,label}
release_id: 127182165
upload_url: https://uploads.github.com/repos/schaepher/Wox/releases/175128313/assets{?name,label}
release_id: 175128313
asset_path: ./Release/wox-windows-amd64.exe # path to archive to upload
asset_name: wox-windows-amd64-$$.exe # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/x-msdownload # required by GitHub API
max_releases: 1
build-linux:
needs: test
runs-on: [ self-hosted, Linux ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt-get update -y
sudo apt-get install -y just nodejs npm golang-go upx keybinder-3.0
sudo apt-get install xcb libxtst-dev libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev libxcomposite-dev
sudo snap install flutter --classic
- name: Build
run: just release linux
- name: Deploy nightly release
uses: WebFreak001/[email protected]
with:
upload_url: https://uploads.github.com/repos/Wox-launcher/Wox/releases/127182165/assets{?name,label}
release_id: 127182165
upload_url: https://uploads.github.com/repos/schaepher/Wox/releases/175128313/assets{?name,label}
release_id: 175128313
asset_path: ./Release/wox-linux-amd64 # path to archive to upload
asset_name: wox-linux-amd64-$$ # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/x-msdownload # required by GitHub API
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Update i18n
# name: Update i18n

on:
push:
branches:
- v2
# on:
# push:
# branches:
# - v2

jobs:
crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# jobs:
# crowdin:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3

- name: crowdin action
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: true
download_translations: true
localization_branch_name: crowdin_i18n
create_pull_request: true
pull_request_title: 'New Crowdin translations'
pull_request_body: 'New Crowdin pull request with translations'
pull_request_labels: 'i18n'
pull_request_assignees: 'crowdin-bot'
pull_request_reviewers: 'qianlifeng'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
# - name: crowdin action
# uses: crowdin/github-action@v1
# with:
# upload_sources: true
# upload_translations: true
# download_translations: true
# localization_branch_name: crowdin_i18n
# create_pull_request: true
# pull_request_title: 'New Crowdin translations'
# pull_request_body: 'New Crowdin pull request with translations'
# pull_request_labels: 'i18n'
# pull_request_assignees: 'crowdin-bot'
# pull_request_reviewers: 'qianlifeng'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
# CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
44 changes: 22 additions & 22 deletions .github/workflows/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: Update plugin store
# name: Update plugin store

on:
push:
branches:
- v2
schedule:
- cron: "0 */3 * * *"
# on:
# push:
# branches:
# - v2
# schedule:
# - cron: "0 */3 * * *"

jobs:
build-macos-arm64:
runs-on: [ self-hosted, macOS, ARM64 ]
steps:
- uses: actions/checkout@v3
- name: Check plugin updates
run: just ci_plugin
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: "[Bot] Update plugin store manifests"
commit-message: "[Bot] Update plugin store manifests"
branch: update-plugin-store
add-paths: plugin-store.json
reviewers: qianlifeng
# jobs:
# build-macos-arm64:
# runs-on: [ self-hosted, macOS, ARM64 ]
# steps:
# - uses: actions/checkout@v3
# - name: Check plugin updates
# run: just ci_plugin
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v6
# with:
# title: "[Bot] Update plugin store manifests"
# commit-message: "[Bot] Update plugin store manifests"
# branch: update-plugin-store
# add-paths: plugin-store.json
# reviewers: qianlifeng
Loading

0 comments on commit 25e55a6

Please sign in to comment.