Skip to content

Commit

Permalink
fix(announce): fix announce it and release jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
thatkookooguy committed Jan 17, 2021
1 parent b9e4ecd commit 3da24a9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 36 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/announce-it.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Announce Release

on:
workflow_run:
workflows: [ "Release" ]
branches: [ master ]
types:
- completed

jobs:
announce:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: |
npm ci
npm install
npm run build
- name: announce-it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
run: npm run start:ci
38 changes: 2 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"start:dev": "ts-node ./src/announce-it-cli.ts",
"start": "node ./bin/announce-it-cli.js",
"test:watch": "jest --watchAll --coverage",
"test": "jest --coverage"
"test": "jest --coverage",
"start:ci": "npm start -- --branch master"
},
"repository": {
"type": "git",
Expand All @@ -44,41 +45,6 @@
"name": "next",
"prerelease": true
}
],
"npmPublish": true,
"analyzeCommits": [
"@semantic-release/commit-analyzer"
],
"verifyConditions": [
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
],
"prepare": [
"@semantic-release/npm",
{
"path": "@semantic-release/git",
"assets": [
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"publish": [
"@semantic-release/npm",
"@semantic-release/github"
],
"success": [
"@semantic-release/github",
[
"@semantic-release/exec",
{
"successCmd": "npm start -- --branch $TRAVIS_BRANCH"
}
]
],
"fail": [
"@semantic-release/github"
]
},
"devDependencies": {
Expand Down

0 comments on commit 3da24a9

Please sign in to comment.