Skip to content

Commit

Permalink
ci: more automated publishing process
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar committed Jan 19, 2023
1 parent f96eca7 commit 27561e2
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 54 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/publish-aur.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/publish-npm.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/publish.yml
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'

0 comments on commit 27561e2

Please sign in to comment.