-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adiciona automação de Release para o Octopost (#272)
* chore: add release pipeline * chore: add release pipeline (#1) * chore: update package-json script * chore: update changeset * chore: enter pre-release mode * chore: update main pipeline to frozen lockfile * chore: update package json to remove electron builder * chore: improve main pipeline to use pnpm cache * chore: update npmrc to auto install peers * docs: update CONTRIUTING.md
- Loading branch information
Showing
10 changed files
with
871 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "devhatt/octopost" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"mode": "pre", | ||
"tag": "alpha", | ||
"initialVersions": { | ||
"@octopost/core": "0.1.0" | ||
}, | ||
"changesets": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@octopost/core': patch | ||
--- | ||
|
||
add a release pipeline and change the name of octopost to @octopost/core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # to create release | ||
issues: write # to post issue comments | ||
pull-requests: write # to create pull request | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Package Manager | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Configuring Node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Set NPM Token | ||
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
|
||
- 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: pnpm release | ||
version: pnpm version-packages | ||
title: '[BUMP] Lançar uma release para o octopost!' | ||
commit: 'chore: bump packages version' | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,53 @@ | ||
## PNPM related ############### | ||
## https://pnpm.io/npmrc # | ||
############################### | ||
|
||
# Not always possible to be strict, but if it works for you, keep it to true. | ||
# https://pnpm.io/next/npmrc#strict-peer-dependencies | ||
strict-peer-dependencies=false | ||
|
||
# https://pnpm.io/npmrc#auto-install-peers | ||
auto-install-peers=true | ||
|
||
# Helps locating duplicates, default in v8 | ||
# https://pnpm.io/next/npmrc#use-lockfile-v6 | ||
use-lockfile-v6=true | ||
|
||
# Will fix duplicates due to peer-dependencies (>=7.29.0), default in v8 | ||
# https://github.com/pnpm/pnpm/releases/tag/v7.29.0 | ||
dedupe-peer-dependents=true | ||
|
||
# Helps with peer-deps (>=7.23.0), default in v8 | ||
# https://pnpm.io/npmrc#resolve-peers-from-workspace-root | ||
resolve-peers-from-workspace-root=true | ||
|
||
# default to 'lowest' in v8.5.0 | ||
# set to highest for reasons specified here: https://github.com/pnpm/pnpm/issues/6463 | ||
# https://pnpm.io/npmrc#resolution-mode | ||
resolution-mode=highest | ||
|
||
# Default in 8.1.0 to fix issues with root/workspaces hoisting | ||
# https://pnpm.io/npmrc#dedupe-direct-deps | ||
dedupe-direct-deps=false | ||
|
||
# Pinlock to exact version (default is '^') | ||
# https://pnpm.io/npmrc#save-prefix | ||
# see also how save-workspace-protocol affect this https://pnpm.io/npmrc#save-workspace-protocol | ||
save-prefix='' | ||
|
||
# Most of the time, you want to use the rolling protocol for monorepos | ||
# https://pnpm.io/npmrc#save-workspace-protocol | ||
save-workspace-protocol=rolling | ||
|
||
# Specifies which exact Node.js version should be used for the project's runtime. | ||
# pnpm will automatically install the specified version of Node.js and use it | ||
# for running pnpm run commands or the pnpm node command. | ||
# https://pnpm.io/npmrc#save-workspace-protocol | ||
use-node-version=18.18.2 | ||
node-version=18.18.0 | ||
|
||
# Prevent contributors of your project from adding new incompatible dependencies | ||
# This way, even if someone is using Node.js v16, they will not be able to install | ||
# a new dependency that doesn't support Node.js v18.18.2. | ||
# https://pnpm.io/npmrc#use-node-version | ||
node-version=18.18.2 | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.