Skip to content

Commit

Permalink
ci: fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Nov 21, 2024
1 parent 54f3c01 commit c2800ee
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 199 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/pr-release.yaml

This file was deleted.

10 changes: 6 additions & 4 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [opened, synchronize, reopened]
push:
branches:
- release
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -15,19 +15,21 @@ concurrency:
env:
FORC_VERSION: 0.63.3
CORE_VERSION: 0.35.0
NODE_VERSION: 20.11.0
PNPM_VERSION: 9.5.0

jobs:
tests-vitest:
name: Vitest Tests
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}

- uses: FuelLabs/github-actions/setups/docker@master
with:
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'PR Checks'
name: "PR Checks"

on:
pull_request:
Expand All @@ -8,6 +8,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
NODE_VERSION: 20.11.0
PNPM_VERSION: 9.5.0

jobs:
validate-title:
name: Validate PR Title
Expand All @@ -23,13 +27,13 @@ jobs:
outputs:
changed: ${{ steps.packages-changed.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check external packages changes
id: packages-changed
uses: tj-actions/[email protected]
with:
files: |
**/packages/connectors/**
**/packages/fuel-streams/**
validate-changeset:
name: Validate PR Changeset
Expand All @@ -38,15 +42,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: CI Setup
- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}

- name: Validate Changeset
run: pnpm changeset status --since=origin/${{ github.base_ref }}
Expand All @@ -56,11 +60,11 @@ jobs:
runs-on: ubuntu-latest
if: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- run: pnpm audit --prod

lint:
Expand All @@ -72,13 +76,13 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}

- name: Run lint & ts:check
run: |
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/release-npm-latest.yaml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/release-npm-preview.yaml

This file was deleted.

20 changes: 12 additions & 8 deletions .github/workflows/release-npm.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Release'
name: "Release"

on:
push:
Expand All @@ -10,21 +10,25 @@ concurrency:
cancel-in-progress: true

env:
BUILD_VERSION: ''
BUILD_VERSION: ""
NODE_VERSION: 20.11.0
PNPM_VERSION: 9.5.0

jobs:
release-changesets:
name: Release main or rc
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# need this to get full git-history/clone in order to build changelogs and check changesets
fetch-depth: 0

- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}

- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
Expand All @@ -50,13 +54,13 @@ jobs:
uses: FuelLabs/changesets-action@main
with:
publish: pnpm changeset publish --tag next
commit: 'ci(changesets): versioning packages'
title: 'ci(changesets): versioning packages'
commit: "ci(changesets): versioning packages"
title: "ci(changesets): versioning packages"
createGithubReleases: aggregate
githubReleaseName: v${{ env.BUILD_VERSION }}
githubTagName: v${{ env.BUILD_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release to @main tag
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/unpublish-npm.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions packages/fuel-streams/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "@fuels/streams",
"version": "0.0.1",
"private": true,
"description": "Official data streaming Typescript library for Fuel Network",
"author": "Fuel Labs <[email protected]> (https://fuel.network/)",
"homepage": "https://github.com/FuelLabs/fuel-streams-js",
"main": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"publishConfig": {
"private": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit c2800ee

Please sign in to comment.