-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: more automated publishing process
- Loading branch information
1 parent
f96eca7
commit 27561e2
Showing
3 changed files
with
69 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- run: ./gradlew shadowJar | ||
- run: mkdir dist | ||
- run: mv build/libs/crowdin-cli-*.jar dist/crowdin-cli.jar | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
- run: sudo npm install jdeploy@3.4.3 -g | ||
- run: npm install | ||
- run: jdeploy install | ||
- run: crowdin -V | ||
|
||
- uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
|
||
aur: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Publish AUR package | ||
uses: KSXGitHub/github-actions-deploy-aur@v2.6.0 | ||
with: | ||
pkgname: crowdin-cli | ||
pkgbuild: ./pkgbuild/PKGBUILD | ||
commit_username: ${{ secrets.AUR_USERNAME }} | ||
commit_email: ${{ secrets.AUR_EMAIL }} | ||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | ||
commit_message: Update AUR package | ||
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519 | ||
|
||
homebrew: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Invoke workflow in the homebrew-crowdin repo | ||
uses: benc-uk/workflow-dispatch@v1 | ||
with: | ||
workflow: publish.yaml | ||
repo: crowdin/homebrew-crowdin | ||
token: ${{ secrets.GH_HOMEBREW_TOKEN }} | ||
inputs: "{ 'version': '${{ github.ref_name }}' }" | ||
|
||
release-asset: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download asset | ||
uses: carlosperate/download-file-action@v2 | ||
with: | ||
file-url: 'https://downloads.crowdin.com/cli/v3/crowdin-cli.zip' | ||
|
||
- name: Upload asset | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: 'crowdin-cli.zip' |