diff --git a/.github/workflows/publish-aur.yml b/.github/workflows/publish-aur.yml deleted file mode 100644 index 8d49fa912..000000000 --- a/.github/workflows/publish-aur.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: publish-aur - -on: - push: - tags: - - '*' - -jobs: - aur-publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Publish AUR package - uses: KSXGitHub/github-actions-deploy-aur@v2.2.4 - 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 diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml deleted file mode 100644 index a190408ed..000000000 --- a/.github/workflows/publish-npm.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: publish-npm - -on: - push: - tags: - - '*' - -jobs: - publish: - 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.5 -g - - run: npm install - - run: jdeploy install - - run: crowdin -V - - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..b34b8ad32 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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'