This repository has been archived by the owner on Jul 20, 2024. It is now read-only.
v0.1.0-alpha.2 🌈 #3
Workflow file for this run
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: Publish Alpha | |
on: | |
release: | |
types: [published] | |
jobs: | |
setup: | |
if: 'github.event.release.prerelease' | |
permissions: | |
contents: none | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.trim.outputs.version }} | |
steps: | |
- id: trim | |
run: echo "version=${TAG:1}" >> $GITHUB_OUTPUT | |
env: | |
TAG: ${{ github.event.release.tag_name }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: 'Checkout the repository' | |
uses: 'actions/checkout@v4' | |
- name: 'Setup Node.js and pnpm' | |
uses: './.github/actions/setup' | |
- name: 'Generate package.json' | |
run: npm run config:prerelease -- ${{ needs.setup.outputs.version }} | |
- name: 'Pack npm package' | |
run: pnpm pack | |
- name: 'Publish to npm' | |
run: pnpm publish --tag alpha --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Upload NPM package file | |
id: upload-npm-package-file | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ needs.setup.outputs.version }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ format('8xff-atm0s-media-react-{0}.tgz', needs.setup.outputs.version) }} | |
asset_name: ${{ format('8xff-atm0s-media-react-{0}.tgz', needs.setup.outputs.version) }} | |
asset_content_type: application/gzip |