Skip to content

Commit

Permalink
👷 Add deploy-nur CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Jul 17, 2023
1 parent 531a1ab commit b4d2552
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ jobs:
body_path: build/CHANGELOG.md
files: |
dist/*
deploy:
deploy-aur:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -102,3 +103,15 @@ jobs:
with:
package_name: python-translate-shell
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}

deploy-nur:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Trigger Workflow
run: >
curl -X POST -d '{"ref":"main"}'
-H "Accept: application/vnd.github.v3+json"
-H "Authorization: Bearer ${{ secrets.GH_TOKEN }}"
https://api.github.com/repos/Freed-Wu/nur-packages/actions/workflows/version.yml/dispatches
29 changes: 29 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"on":
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:

jobs:
build:
strategy:
matrix:
nixpkgs:
- nixos-unstable
- nixpkgs-unstable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:${{matrix.nixpkgs}}
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{secrets.GITHUB_TOKEN}}
- name: Build
run: |
nix build
2 changes: 1 addition & 1 deletion addon-info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "translate-shell",
"description": "Translate text by google, bing, youdaozhiyun, haici, stardict, openai, large language model of local machine, etc at same time from CLI, GUI (GNU/Linux, Android, macOS and Windows), REPL, python, shell and vim.",
"version": "0.0.29",
"version": "0.0.30",
"author": "Wu Zhenyu <wuzhenyu@ustc.edu>",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "translate-shell",
"version": "0.0.29",
"version": "0.0.30",
"description": "Translate text by google, bing, youdaozhiyun, haici, stardict, openai, large language model of local machine, etc at same time from CLI, GUI (GNU/Linux, Android, macOS and Windows), REPL, python, shell and vim.",
"author": "Wu Zhenyu <wuzhenyu@ustc.edu>",
"license": "GPLv3"
Expand Down

0 comments on commit b4d2552

Please sign in to comment.