Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build, publish package

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
# Required by the configure-aws-credentials action and GitHub OIDC Token endpoint
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- run: npm run build

- name: Setting the package version
run: echo "pkg_version=$(jq -r .version < ${{ github.workspace }}/package.json)" >> $GITHUB_ENV

# Publish the package on NPM
- run: npm publish --access=public --tag=${{ env.pkg_version }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# Publish the schema on S3
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::827160314823:role/StackmateEngineTestsRunner
role-session-name: SessionInGitHubActionsForAssetsPublishing
aws-region: eu-central-1

- name: Generating the schema
run: npm run schema:export

- name: Publishing to S3
run: aws s3 cp ${{ github.workspace }}/dist/schema.json s3://stackmate-public-assets/${{ env.pkg_version }}/schema.json
3 changes: 0 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_OPTIONS: '--max_old_space_size=4096'
steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stackmate/engine",
"version": "0.1.4",
"description": "Engine library for Stackmate",
"name": "@stackmate/stackmate",
"version": "0.2.1",
"description": "Stackmate - Infrastructure for busy developers",
"homepage": "https://stackmate.io",
"keywords": [
"stackmate",
Expand All @@ -15,14 +15,14 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/stackmate-io/engine"
"url": "https://github.com/stackmate-io/stackmate"
},
"author": {
"name": "Fotis Alexandrou (@falexandrou)",
"url": "https://www.falexandrou.com"
},
"bugs": {
"url": "https://github.com/stackmate-io/engine/issues"
"url": "https://github.com/stackmate-io/stackmate/issues"
},
"bin": "dist/bin/cli.js",
"main": "dist/src/index.js",
Expand Down