This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add github actions to test and build (#56)
* chore: standard github actions
- Loading branch information
Showing
17 changed files
with
4,077 additions
and
5,746 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,36 @@ | ||
name: Manual Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.IDEE_GH_TOKEN }} | ||
- name: Conventional Changelog Action | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@d360fad3a42feca6462f72c97c165d60a02d4bf2 | ||
# overriding some of the basic behaviors to just get the changelog | ||
with: | ||
git-user-name: Release Bot | ||
git-user-email: ${{ secrets.IDEE_GH_EMAIL }} | ||
github-token: ${{ secrets.IDEE_GH_TOKEN }} | ||
output-file: false | ||
# always do the release, even if there are no semantic commits | ||
skip-on-empty: false | ||
tag-prefix: '' | ||
- uses: notiz-dev/github-action-json-property@2192e246737701f108a4571462b76c75e7376216 | ||
id: packageVersion | ||
with: | ||
path: 'package.json' | ||
prop_path: 'version' | ||
- name: Create Github Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.IDEE_GH_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.packageVersion.outputs.prop }} | ||
release_name: ${{ steps.packageVersion.outputs.prop }} |
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,11 @@ | ||
name: Version, Tag and Github Release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
release: | ||
uses: salesforcecli/github-workflows/.github/workflows/githubRelease.yml@gbockus/updateReleaseToIncludeTokenInput | ||
secrets: | ||
ALT_GITHUB_TOKEN: ${{ secrets.IDEE_GH_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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Publish | ||
|
||
# when a github release happens, publish an npm package, | ||
on: | ||
release: | ||
types: [released] | ||
# support manual release | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: tag that needs to publish | ||
type: string | ||
required: true | ||
jobs: | ||
npm: | ||
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main | ||
with: | ||
ctc: false | ||
githubTag: ${{ github.event.release.tag_name || inputs.tag }} | ||
secrets: inherit |
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,26 @@ | ||
name: Slack Notification for Github Actions | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Push to main | ||
- release | ||
types: | ||
- completed | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Announce result | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"text": "GitHub Actions Notification", | ||
"event": "${{ github.event.workflow_run.name }}, run: ${{ github.event.workflow_run.html_url }}", | ||
"repo": "${{ github.event.workflow_run.repository.name }}", | ||
"result": "${{ github.event.workflow_run.conclusion }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.IDEE_RELEASE_ALERT_SLACK_WEBHOOK }} |
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,8 @@ | ||
name: Unit Tests | ||
on: | ||
push: | ||
branches-ignore: [main] | ||
|
||
jobs: | ||
unit-tests: | ||
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main |
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,17 @@ | ||
name: Validate PR | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
pr-validation: | ||
uses: salesforcecli/github-workflows/.github/workflows/validatePR.yml@main | ||
format-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install modules | ||
run: yarn | ||
- name: Check Format | ||
run: yarn format |
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,5 +1,4 @@ | ||
# Dev config folders | ||
/.circleci | ||
/.vscode | ||
/docs | ||
/src | ||
|
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,9 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [ | ||
|
||
] | ||
} | ||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": ["dbaeumer.vscode-eslint"], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [] | ||
} |
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,28 +1,5 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Publish apex-tmLanguage", | ||
"command": "./scripts/publish-workflow.sh", | ||
"type": "shell", | ||
"args": ["${input:circleCiId}", "${input:publishType}"] | ||
}, | ||
|
||
], | ||
"inputs": [ | ||
{ | ||
"id": "circleCiId", | ||
"type": "promptString", | ||
"description": "CircleCi Token" | ||
}, | ||
{ | ||
"id": "publishType", | ||
"type": "pickString", | ||
"description": "Type of version to publish", | ||
"options": ["minor", "patch", "major"], | ||
"default": "minor" | ||
} | ||
] | ||
} | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
# Publishing | ||
|
||
This is a guide for publishing this package to the npm registry as `@salesforce/apex-tmlanguage` | ||
|
||
## Steps | ||
|
||
1. `npm install` | ||
1. `npm run prepare` | ||
1. `npm publish --access public` (FYI: By default, scoped packages are published with private visibility.) | ||
Publishing happens automatically when a commit with the tag `feat` or `fix` is merged to main. |
Oops, something went wrong.