Skip to content

Commit

Permalink
ci: update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarJaroudi committed Sep 23, 2024
1 parent 25504b5 commit a0c3187
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 30 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NPM_AUTH_TOKEN: ${{ secrets.ARTIFACTORY_NPM_AUTH_TOKEN }}

jobs:

release-notes:
name: Release notes preview
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- uses: open-turo/actions-release/release-notes-preview@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NPM_TOKEN: ${{ secrets.OPEN_TURO_NPM_TOKEN }}

lint:
name: Lint
runs-on: ubuntu-latest
runs-on: [self-hosted, general-ubuntu]
steps:
- uses: actions/checkout@v3
- uses: open-turo/actions-node/lint@v6
with:
fetch-depth: 0
- uses: open-turo/action-pre-commit@v1
github-token: ${{ secrets.TURO_GITHUB_TOKEN }}
npm-auth-token: ${{ secrets.ARTIFACTORY_NPM_AUTH_TOKEN }}
internal-dependency-prefixes: "@turo"

test:
name: Test
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
name: Release
# Only release when we merge to main

on:
push:
branches: [main, "[0-9]+.x"]
workflow_dispatch: # enable manual release

# Handle release versioning automatically with semantic release
branches: [main, "v*"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
semantic-release:
release:
name: Release
runs-on: ubuntu-latest
runs-on: [self-hosted, general-ubuntu]
env:
NODE_MODULES_CACHE_BUCKET_NAME: core-servi-github-actions-build-cach20240118162152102700000001
NODE_MODULES_CACHE_BUCKET_REGION: us-east-1
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: open-turo/actions-release/semantic-release@v2
- uses: open-turo/actions-node/release@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-plugins: |
@open-turo/semantic-release-config
github-token: ${{ secrets.TURO_GITHUB_TOKEN }}
npm-auth-token: ${{ secrets.ARTIFACTORY_NPM_AUTH_TOKEN }}
s3-bucket-name: ${{ env.NODE_MODULES_CACHE_BUCKET_NAME }}
s3-bucket-region: ${{ env.NODE_MODULES_CACHE_BUCKET_REGION }}
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@open-turo/semantic-release-config"
"extends": "@open-turo/semantic-release-config/lib/npm"
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"type": "git",
"url": "git+https://github.com/turo/pre-commit-hooks.git"
},
"scripts": {
"lint": "echo 'No linting configured'"
},
"type": "module",
"version": "4.0.0"
}

0 comments on commit a0c3187

Please sign in to comment.