-
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.
Merge pull request #2 from sapcc/hgw-build-release
feat(ci): build release
- Loading branch information
Showing
7 changed files
with
78 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: maillog-ui checks | ||
|
||
on: | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
- run: npm install | ||
- run: npm test |
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,51 @@ | ||
name: package-release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- package.json | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
jobs: | ||
build-and-publish: | ||
runs-on: [ubuntu-latest] | ||
env: | ||
ACTIONS_RUNNER_DEBUG: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
registry-url: https://npm.pkg.github.com/ | ||
# @sapcc | ||
# this is the scope of the package to publish to the registry-url that is defined above | ||
scope: "@${{ github.repository_owner }}" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Test | ||
run: npm run test | ||
|
||
- name: Build | ||
run: | | ||
npm run build | ||
ls -la | ||
- name: Publish to github packages | ||
run: | | ||
set +e | ||
# publish to https://github.com/${{ github.repository_owner }}/packages | ||
npm publish --access=public # --dry-run | ||
if [ $? != 0 ] ; then | ||
echo "::warning title=PUBLISH::Could not publish to github. Maybe you forgot to increment the version?" | ||
exit 0 | ||
fi | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
REPOSITORY_OWNER: ${{ github.repository_owner }} |
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
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