Skip to content

spec(rails): Add rails icon (#2137) #1443

spec(rails): Add rails icon (#2137)

spec(rails): Add rails icon (#2137) #1443

Workflow file for this run

name: Build and release specs
on:
push:
paths:
- 'src/**/*.ts'
- '!package.json'
branches:
# We only want to create a new release when
# - a pr is merged to master
# - we push into master
- 'master'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.FIG_BOT_TOKEN }}
# Install all dependencies
- name: install
run: yarn install --no-immutable
# Transpile all specs from ts to js
- name: build
run: yarn build
# Zip the transpiled files into the specs.zip file
- name: bundle files
run: |
mv build/ specs/
zip -r specs.zip specs/
mv specs/ build/
# Bump the version and create a git tag with the new version
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
tag_prefix: spec-build-number-
# Bump versions in full numbers (1.0.0 -> 2.0.0)
default_bump: minor
github_token: ${{ secrets.GITHUB_TOKEN }}
# Create a new github release with the newly created specs.zip file
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
files: specs.zip
tag_name: ${{ steps.tag_version.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Automated Version Bump'
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.FIG_BOT_TOKEN }}
with:
skip-tag: 'true'
- name: Publish to npm
uses: JS-DevTools/npm-publish@v3
with:
access: public
token: ${{ secrets.NPM_PUBLISH_TOKEN }}