-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
8,147 additions
and
2,915 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -14,53 +14,29 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: '${{ secrets.TOLGEE_MACHINE_PAT }}' | ||
|
||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 8.6.12 | ||
run_install: false | ||
fetch-depth: 0 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
cache: pnpm | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run get new version | ||
run: npm run release-dry | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set version property | ||
id: version | ||
run: echo ::set-output name=VERSION::$(test -e .VERSION && echo v$(cat .VERSION)) | ||
run: npm ci | ||
|
||
- name: Build | ||
if: ${{ steps.version.outputs.VERSION != '' }} | ||
run: pnpm run build | ||
|
||
- name: Login to docker | ||
run: echo '${{ secrets.TOLGEE_MACHINE_PAT }}' | docker login ghcr.io -u USERNAME --password-stdin | ||
|
||
|
||
- name: Create docker image | ||
if: ${{ steps.version.outputs.VERSION != '' }} | ||
run: | | ||
docker buildx create --use | ||
docker buildx build . -t ghcr.io/tolgee/translator:${{ steps.version.outputs.VERSION }} --platform linux/arm64,linux/amd64 --push | ||
docker buildx build . -t ghcr.io/tolgee/translator:latest --platform linux/arm64,linux/amd64 --push | ||
run: npm run build | ||
|
||
- name: Run npm release | ||
if: ${{ steps.version.outputs.VERSION != '' }} | ||
run: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ steps.version.outputs.VERSION }} | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
|
||
|
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
Oops, something went wrong.