-
Notifications
You must be signed in to change notification settings - Fork 29
52 lines (52 loc) · 2.02 KB
/
deployFreighterApiProduction.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}