Skip to content

Commit 109ea8d

Browse files
authored
chore: prepare for first early-access release (#8)
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
1 parent de4b50c commit 109ea8d

File tree

2 files changed

+54
-11
lines changed

2 files changed

+54
-11
lines changed

.github/workflows/stage.yml

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,53 @@ jobs:
1818
steps:
1919
- name: Checkout sources
2020
uses: actions/checkout@v3
21+
with:
22+
ssh-key: ${{ secrets.DEPLOY_KEY }}
2123

2224
- name: Install node 18
2325
uses: actions/setup-node@v3
2426
with:
25-
node-version: '18'
27+
node-version: 18
2628
cache: npm
29+
registry-url: 'https://npm.pkg.github.com'
2730

28-
- name: Setup Java 17
29-
uses: actions/setup-java@v3
30-
with:
31-
distribution: temurin
32-
java-version: 17
31+
- name: Configure git
32+
run: |
33+
git config user.name "${{ github.actor }}"
34+
git config user.email "${{ github.actor }}@users.noreply.github.com"
35+
36+
- name: Update package with new version
37+
id: bump
38+
run: |
39+
echo "version=$(npm version prerelease --no-git-tag-version --preid ea)" >> "$GITHUB_OUTPUT"
3340
3441
- name: Install project modules
35-
run: npm ci
42+
run: npm ci --production
3643

37-
- name: Lint source files
38-
run: npm run lint
44+
- name: Publish package
45+
run: npm publish
3946

40-
- name: Run unit tests and verify code coverage
41-
run: npm test
47+
- name: Commit and push package modifications
48+
run: |
49+
git add package.json
50+
git add package-lock.json
51+
git commit -m "build: updated package with ${{ steps.bump.outputs.version }} [skip ci]"
52+
git push
53+
54+
- name: Create and push new tag
55+
run: |
56+
git tag ${{ steps.bump.outputs.version }} -m "${{ steps.bump.outputs.version }}"
57+
git push origin ${{ steps.bump.outputs.version }}
58+
59+
- name: Create a release
60+
uses: actions/github-script@v6.4.1
61+
with:
62+
github-token: ${{ secrets.STAGING_PAT }}
63+
script: |
64+
const repo_name = context.payload.repository.full_name
65+
const response = await github.request('POST /repos/' + repo_name + '/releases', {
66+
tag_name: '${{ steps.bump.outputs.version }}',
67+
name: '${{ steps.bump.outputs.version }}',
68+
prerelease: true,
69+
generate_release_notes: true
70+
})

integration/run_its.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ then
2929
fi
3030
echo "- SUCCESSFUL"
3131

32+
echo "VERIFYING Java and Maven availability"
33+
if ! java --version > /dev/null 2>&1
34+
then
35+
echo "- FAILED Java not found"
36+
exit $?
37+
fi
38+
39+
if ! mvn --version > /dev/null 2>&1
40+
then
41+
echo "- FAILED Maven not found"
42+
exit $?
43+
fi
44+
echo "- SUCCESSFUL"
45+
3246
##########################################
3347
###### JavaScript Integration Tests ######
3448
##########################################

0 commit comments

Comments
 (0)