Skip to content

Commit

Permalink
shared workflows (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enalmada authored Oct 19, 2023
1 parent 3c3ea5d commit 25a1df9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 60 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/changesets-renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,4 @@ on:

jobs:
generate-changeset:
runs-on: ubuntu-latest
if: github.actor == 'renovate[bot]'
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install Dependencies
run: bun install

- name: Git Identity
run: |
git config --global user.name 'Renovate Bot'
git config --global user.email '[email protected]'
- name: Run changesets-renovate
run: bunx @scaleway/changesets-renovate
uses: enalmada/.github/.github/workflows/changesets-renovate.yml@main
29 changes: 3 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,8 @@ on:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install Dependencies
run: bun install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: bun release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

uses: enalmada/.github/.github/workflows/release.yml@main
secrets:
npm_token: ${{ secrets.NPM_TOKEN }}
15 changes: 2 additions & 13 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,7 @@ on:
branches:
- main
workflow_dispatch:
inputs:
target_url:
description: 'Deployment target URL'
required: true

jobs:
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- run: bun run test:unit
tests:
uses: enalmada/.github/.github/workflows/run-tests.yml@main

0 comments on commit 25a1df9

Please sign in to comment.