Skip to content

2.5.1

2.5.1 #120

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: publish
on:
release:
types: [published]
env:
NODE_VERSION: 18
jobs:
publish-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- run: npm ci --ignore-scripts
- run: npm run build
- name: publish js project
run: npm publish
working-directory: bin
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
tweet:
needs: publish-package
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- uses: Eomm/why-don-t-you-tweet@v1
if: ${{ !github.event.repository.private }}
with:
tweet-message: "swpm ${{ github.event.release.tag_name }} 🐛🔨 is here 🥳\n\n
$ npm install swpm@latest --location=global\n\n
#swpm #cli #npm #yarn #pnpm #bun #nodejs #javascript #typescript\n\n
https://github.com/deinsoftware/swpm/blob/main/CHANGELOG.md"
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}