Skip to content

Commit

Permalink
added workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Lysak committed Oct 2, 2024
1 parent 98fa7ca commit 0e566d4
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 3 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release

on:
push:
branches:
- main

defaults:
run:
shell: bash

env:
FORCE_COLOR: true

jobs:
changelog:
name: PR or Release
if: ${{ github.repository_owner == 'ensdomains' }}
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable pnpm

- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Build Packages
run: pnpm -r build

- name: Fix npmrc
run: npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
# Note: pnpm install after versioning is necessary to refresh lockfile
version: pnpm chgset:version
publish: pnpm release
commit: "chore: release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Needs access to publish to npm
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@ensdomains/ens-test-env",
"type": "module",
"version": "0.5.0-beta.1",
"version": "0.5.0-beta.2",
"files": [
"src"
],
"types": "src/index.d.ts",
"scripts": {
"ver": "pnpm version --no-workspaces-update",
"publish:local": "yalc publish . --push --up"
"publish:local": "yalc publish --push --up"
},
"engines": {
"node": ">=18"
Expand Down Expand Up @@ -39,7 +39,8 @@
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.8.8",
"ts-node": "^10.7.0",
"typescript": "^5.3.2"
"typescript": "^5.3.2",
"yalc": "^1.0.0-pre.53"
},
"preferUnplugged": true,
"bin": "./src/index.js"
Expand Down
118 changes: 118 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e566d4

Please sign in to comment.