Skip to content

Commit

Permalink
Enable commit lint and add placeholder release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmenzel committed Sep 25, 2024
1 parent 0143539 commit d6e7ed5
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 39 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
workflow_call:


jobs:
ci-algo-ts:
uses: ./.github/workflows/node-ci.yml
with:
node-version: 20.x
run-build: true
audit-script: npm run audit
working-directory: packages/algo-ts
upload-artifact-name: algo-ts
upload-artifact-path: ./packages/algo-ts/dist
ci-algo-ts-testing:
uses: ./.github/workflows/node-ci.yml
needs:
- ci-algo-ts
with:
download-artifact-name: algo-ts
download-artifact-path: ./packages/algo-ts/dist
node-version: 20.x
run-build: true
build-script: npm run build
audit-script: npm run audit
working-directory: packages/algo-ts-testing
upload-artifact-name: algo-ts-testing
upload-artifact-path: ./packages/algo-ts-testing/dist
ci-puya-ts:
uses: ./.github/workflows/node-ci.yml
needs:
- ci-algo-ts
- ci-algo-ts-testing
with:
download-artifact-pattern: algo-*
download-artifact-path: ./packages-temp
pre-run-script: mv packages-temp/algo-ts packages/algo-ts/dist && mv packages-temp/algo-ts-testing packages/algo-ts-testing/dist
node-version: 20.x
run-build: true
run-commit-lint: true
pre-test-script: |
pipx install algokit
algokit localnet start
build-script: npm run build
audit-script: npm run audit
upload-artifact-name: puya-ts
upload-artifact-path: ./dist
42 changes: 3 additions & 39 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,6 @@ permissions:
contents: read

jobs:
ci-algo-ts:
uses: ./.github/workflows/node-ci.yml
with:
node-version: 20.x
run-build: true
audit-script: npm run audit
working-directory: packages/algo-ts
upload-artifact-name: algo-ts
upload-artifact-path: ./packages/algo-ts/dist
ci-algo-ts-testing:
uses: ./.github/workflows/node-ci.yml
needs:
- ci-algo-ts
with:
download-artifact-name: algo-ts
download-artifact-path: ./packages/algo-ts/dist
node-version: 20.x
run-build: true
build-script: npm run build
audit-script: npm run audit
working-directory: packages/algo-ts-testing
upload-artifact-name: algo-ts-testing
upload-artifact-path: ./packages/algo-ts-testing/dist
ci-puya-ts:
uses: ./.github/workflows/node-ci.yml
needs:
- ci-algo-ts
- ci-algo-ts-testing
with:
download-artifact-pattern: algo-*
download-artifact-path: ./packages-temp
pre-run-script: mv packages-temp/algo-ts packages/algo-ts/dist && mv packages-temp/algo-ts-testing packages/algo-ts-testing/dist
node-version: 20.x
run-build: true
pre-test-script: |
pipx install algokit
algokit localnet start
build-script: npm run build
audit-script: npm run audit
ci-all:
name: 'Build and test all packages'
uses: ./.github/workflows/ci-all.yml
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish

on:
push:
branches:
- compiler-alpha
- main
- release
workflow_dispatch:

concurrency: release

permissions:
contents: write

jobs:
ci:
name: Build and test
uses: ./.github/workflows/ci-all.yml

release:
name: Release
needs: ci
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Download package artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
60 changes: 60 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"branches": [
{
"name": "main",
"prerelease": "beta"
},
{
"name": "release"
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"type": "build",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "build",
"section": "Dependencies and Other Build Updates",
"hidden": false
}
]
}
}
],
[
"@semantic-release/npm",
{
"npmPublish": true,
"pkgRoot": "."
}
],
"@semantic-release/github"
]
}

0 comments on commit d6e7ed5

Please sign in to comment.