Skip to content

Deploy @stellar/freighter-api #7

Deploy @stellar/freighter-api

Deploy @stellar/freighter-api #7

name: Deploy @stellar/freighter-api
on:
workflow_dispatch:
inputs:
release:
description: Release Number
default: "2.0.0"
required: true
jobs:
bump-version:
name: Checkout code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build package
uses: actions/setup-node@v4
with:
node-version: '21.x'
registry-url: 'https://registry.npmjs.org'
always-auth: true
- name: Version npm package
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
cd @stellar/freighter-api
yarn config set version-tag-prefix "@stellar/freighter-api@"
yarn config set version-git-message "@stellar/freighter-api: bumping version to %s"
yarn version --new-version ${{ github.event.inputs.release }}
cd ../../
- run: yarn && yarn build:freighter-api
- name: Publish npm package
run: |
cd @stellar/freighter-api
yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
title: Bump @stellar/freighter-api version to ${{ github.event.inputs.version }}
- name: Slack Notification
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 #v2.3.2
env:
MSG_MINIMAL: true
SLACK_CHANNEL: release
SLACK_COLOR: "#70E1C8"
SLACK_ICON: https://github.com/stellar/freighter/blob/master/docs/static/images/logo.png?size=48
SLACK_MESSAGE: "https://github.com/stellar/freighter/releases/tag/${{ github.event.inputs.release }}"
SLACK_TITLE: "@stellar/freighter-api has been deployed to npm!"
SLACK_USERNAME: Freighter Administrative Assistant
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}