Fetch Tweets and Publish new package #144
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
name: Fetch Tweets and Publish new package | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 6' | |
jobs: | |
fetch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prep | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: 'codeimpossible' | |
- name: Fetch Tweets | |
uses: actions/checkout@v2 | |
- name: Fetch tweets and push | |
env: | |
GITHUB_USER: 'codeimpossible' | |
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
TWITTER_ACCESS_KEY: ${{ secrets.TWITTER_ACCESS_KEY }} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn install | |
node ./bin/main.js ${GITHUB_USER} | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
{ git commit -m "adds $count new tweets" && npm version minor && git push && npm publish --registry=https://npm.pkg.github.com; } || true |