-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update build pipeline to our new process (#337)
- Loading branch information
1 parent
810f0d1
commit 2580363
Showing
9 changed files
with
176 additions
and
72 deletions.
There are no files selected for viewing
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,32 @@ | ||
on: | ||
push: | ||
branches: | ||
- release-please--** | ||
name: "Build & Push Dist" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.INTEGRATIONS_FNM_BOT_TOKEN }} | ||
- name: install | ||
run: npm ci | ||
- name: build | ||
run: npm run build | ||
- name: update README | ||
run: |- | ||
MAJOR_VERSION=$(cat package.json \ | ||
| grep version \ | ||
| head -1 \ | ||
| awk -F: '{ print $2 }' \ | ||
| sed 's/[", ]//g' \ | ||
| awk -F. '{ print $1 }') | ||
sed -i "s/\(uses: OctopusDeploy\/install-octopus-cli-action@\).*/\1v${MAJOR_VERSION}/g" README.md | ||
- name: commit | ||
run: |- | ||
git config --global user.name "team-integrations-fnm-bot" | ||
git config user.email 'integrationsfnmbot@octopus.com' | ||
git add README.md | ||
git add dist/ | ||
git diff-index --quiet HEAD || (git commit -m "chore: build dist and update README" && git push origin) |
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,44 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
name: release-please | ||
env: | ||
ACTION_NAME: install-octopus-cli-action | ||
jobs: | ||
release-please-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
package-name: ${{env.ACTION_NAME}} | ||
release-type: node | ||
token: ${{ github.token }} | ||
command: github-release | ||
- uses: actions/checkout@v3 | ||
- name: tag major and minor versions | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: | | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git tag -d v${{ steps.release.outputs.major }} || true | ||
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | ||
git push origin :v${{ steps.release.outputs.major }} || true | ||
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | ||
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" | ||
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" | ||
git push origin v${{ steps.release.outputs.major }} | ||
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} | ||
release-please-pr: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- release-please-release | ||
steps: | ||
- id: release-pr | ||
uses: google-github-actions/release-please-action@v3 | ||
with: | ||
token: ${{ secrets.INTEGRATIONS_FNM_BOT_TOKEN }} | ||
release-type: node | ||
package-name: ${{env.ACTION_NAME}} | ||
command: release-pr |
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,21 +1,37 @@ | ||
name: 'build-test' | ||
on: | ||
pull_request: | ||
push: | ||
|
||
schedule: | ||
# Daily 5am australian/brisbane time (7pm UTC) | ||
- cron: '0 19 * * *' | ||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
runs-on: ubuntu-latest | ||
# https://github.com/dorny/test-reporter/issues/168 | ||
permissions: | ||
statuses: write | ||
checks: write | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npm run all | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install package dependencies | ||
run: npm install | ||
|
||
- name: Compile and run tests | ||
run: npm run all | ||
|
||
- name: Test Report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() | ||
with: | ||
name: JEST Tests | ||
path: 'reports/jest-*.xml' | ||
reporter: jest-junit | ||
|
||
- name: Install Octopus CLI | ||
uses: ./ | ||
with: | ||
version: latest | ||
- run: octo version | ||
|
||
- run: octo version |
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 |
---|---|---|
|
@@ -101,4 +101,5 @@ lib/**/* | |
# ignore test artifacts | ||
*.pdb | ||
octo | ||
out | ||
out | ||
reports/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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