-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a github action to auto-build the library.
Also fixed a test error and two warnings.
- Loading branch information
Showing
6 changed files
with
105 additions
and
22 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
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,98 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- stable | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '21' | ||
|
||
- name: Set up Java | ||
uses: actions/[email protected] | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
|
||
- name: Get next version | ||
uses: reecetech/[email protected] | ||
id: version | ||
with: | ||
scheme: semver | ||
release_branch: stable | ||
increment: patch | ||
|
||
- name: Tag Commit | ||
if: github.ref == 'refs/heads/stable' | ||
uses: CrabMatrix/[email protected] | ||
with: | ||
tag: ${{ steps.version.outputs.version }} | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Build package | ||
run: | | ||
echo "Building package" | ||
make pkg | ||
- name: Update package version | ||
run: | | ||
echo "Updating package version to ${{ steps.version.outputs.version }}" | ||
sed -i "s/\"version\": \".*\"/\"version\": \"${{ steps.version.outputs.version }}\"/" temp_files/sabre/package.json | ||
- name: Publish package | ||
run: | | ||
echo "Publishing package" | ||
pushd temp_files/sabre && npm config set _authToken=$NODE_AUTH_TOKEN && npm publish && popd | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
|
||
- name: Create release | ||
if: github.ref == 'refs/heads/stable' | ||
id: create_release | ||
uses: release-drafter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
config-file: .github/release-drafter.yml | ||
tag: ${{ steps.version.outputs.version }} | ||
name: ${{ steps.version.outputs.version }} | ||
version: ${{ steps.version.outputs.version }} | ||
|
||
- name: Zip Release | ||
if: github.ref == 'refs/heads/stable' | ||
run: zip -r -9 SABRE,js-${{ steps.version.outputs.version }}.zip ./bin ./debugbin ./LICENSE.md | ||
|
||
- name: Upload Release | ||
if: github.ref == 'refs/heads/stable' | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./SABRE,js-${{ steps.version.outputs.version }}.zip | ||
asset_name: SABRE,js-${{ steps.version.outputs.version }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Publish Release | ||
if: github.ref == 'refs/heads/stable' | ||
uses: eregon/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_id: ${{ steps.create_release.outputs.id }} | ||
|
||
|
||
|
||
|
||
|
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
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