-
Notifications
You must be signed in to change notification settings - Fork 25
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
9 changed files
with
167 additions
and
129 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 |
---|---|---|
@@ -1,56 +1,56 @@ | ||
name: Compile extension PR preview | ||
# name: Compile extension PR preview | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "extension/**/*" | ||
# on: | ||
# pull_request: | ||
# paths: | ||
# - "extension/**/*" | ||
|
||
jobs: | ||
compile: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# compile: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Build extension | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.14.0" | ||
- run: yarn install && yarn build:extension-preview | ||
- name: Zip extension build | ||
uses: montudor/[email protected] | ||
with: | ||
args: zip -qq -r ./extension/build/build.zip ./extension/build | ||
- name: Delete Release # if it exists | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
delete_release: true | ||
tag_name: pr-release-${{ github.event.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: pr-release-${{ github.event.number }} | ||
release_name: PR Preview ${{ github.event.number }} | ||
draft: false | ||
prerelease: true | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./extension/build/build.zip | ||
asset_name: build-pr-preview-${{ github.event.number }}.zip | ||
asset_content_type: application/zip | ||
# steps: | ||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
# - uses: actions/checkout@v2 | ||
# - name: Build extension | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: "16.14.0" | ||
# - run: yarn install && yarn build:extension-preview | ||
# - name: Zip extension build | ||
# uses: montudor/[email protected] | ||
# with: | ||
# args: zip -qq -r ./extension/build/build.zip ./extension/build | ||
# - name: Delete Release # if it exists | ||
# uses: dev-drprasad/[email protected] | ||
# with: | ||
# delete_release: true | ||
# tag_name: pr-release-${{ github.event.number }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Create Release | ||
# id: create_release | ||
# uses: actions/create-release@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# tag_name: pr-release-${{ github.event.number }} | ||
# release_name: PR Preview ${{ github.event.number }} | ||
# draft: false | ||
# prerelease: true | ||
# - name: Upload Release Asset | ||
# id: upload-release-asset | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
# asset_path: ./extension/build/build.zip | ||
# asset_name: build-pr-preview-${{ github.event.number }}.zip | ||
# asset_content_type: application/zip | ||
|
||
- name: Comment PR | ||
uses: thollander/actions-comment-pull-request@v1 | ||
with: | ||
message: Preview build at https://github.com/${{ github.repository }}/releases/download/pr-release-${{ github.event.number }}/build-pr-preview-${{ github.event.number }}.zip | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Comment PR | ||
# uses: thollander/actions-comment-pull-request@v1 | ||
# with: | ||
# message: Preview build at https://github.com/${{ github.repository }}/releases/download/pr-release-${{ github.event.number }}/build-pr-preview-${{ github.event.number }}.zip | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
name: Build translations | ||
# name: Build translations | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "extension/**/*" | ||
# on: | ||
# pull_request: | ||
# paths: | ||
# - "extension/**/*" | ||
|
||
jobs: | ||
translate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.14.0" | ||
- name: Run translation job | ||
run: | | ||
yarn && yarn build:freighter-api && yarn build:extension:translations | ||
- name: Verify diff | ||
id: verify_diff | ||
run: | | ||
git diff --quiet || echo "::set-output name=new_translations_exist::true" | ||
- name: Commit files | ||
if: steps.verify_diff.outputs.new_translations_exist == 'true' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m "Add translations" -a | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.head_ref }} | ||
# jobs: | ||
# translate: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# with: | ||
# persist-credentials: false | ||
# fetch-depth: 0 | ||
# - uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: "16.14.0" | ||
# - name: Run translation job | ||
# run: | | ||
# yarn && yarn build:freighter-api && yarn build:extension:translations | ||
# - name: Verify diff | ||
# id: verify_diff | ||
# run: | | ||
# git diff --quiet || echo "::set-output name=new_translations_exist::true" | ||
# - name: Commit files | ||
# if: steps.verify_diff.outputs.new_translations_exist == 'true' | ||
# run: | | ||
# git config --local user.email "[email protected]" | ||
# git config --local user.name "GitHub Action" | ||
# git commit -m "Add translations" -a | ||
# - name: Push changes | ||
# uses: ad-m/github-push-action@master | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# branch: ${{ github.head_ref }} |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
name: Cleanup extension PR preview on close | ||
# name: Cleanup extension PR preview on close | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
# on: | ||
# pull_request: | ||
# types: [closed] | ||
|
||
jobs: | ||
close: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# close: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Delete Release | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
delete_release: true | ||
tag_name: pr-release-${{ github.event.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# steps: | ||
# - name: Delete Release | ||
# uses: dev-drprasad/[email protected] | ||
# with: | ||
# delete_release: true | ||
# tag_name: pr-release-${{ github.event.number }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: Cleanup extension PR preview on merge | ||
# name: Cleanup extension PR preview on merge | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
# on: | ||
# push: | ||
# branches: | ||
# - master | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# merge: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Delete Release | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
delete_release: true | ||
tag_name: pr-release-${{ github.event.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# steps: | ||
# - name: Delete Release | ||
# uses: dev-drprasad/[email protected] | ||
# with: | ||
# delete_release: true | ||
# tag_name: pr-release-${{ github.event.number }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,49 @@ | ||
name: Test and build | ||
on: [pull_request] | ||
name: Translate and Test | ||
on: | ||
pull_request: | ||
paths: | ||
- "extension/**/*" | ||
jobs: | ||
test: | ||
# test-ci: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: 16.14.0 | ||
# - run: yarn install | ||
# - run: yarn build:freighter-api | ||
# - run: yarn test:ci | ||
build-translations: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.14.0 | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn test:ci | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.14.0" | ||
- name: Run translation job | ||
run: | | ||
yarn && yarn build:freighter-api && yarn build:extension:translations | ||
- name: Verify diff | ||
id: verify_diff | ||
run: | | ||
git diff --quiet || echo "::set-output name=new_translations_exist::true" | ||
- name: Commit files | ||
if: steps.verify_diff.outputs.new_translations_exist == 'true' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m "Add translations" -a | ||
- name: Push changes | ||
if: steps.verify_diff.outputs.new_translations_exist == 'true' | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.head_ref }} | ||
- name: Run tests | ||
run: | | ||
yarn test:ci |
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
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
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
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