-
Notifications
You must be signed in to change notification settings - Fork 1.4k
70 lines (63 loc) · 2.56 KB
/
Copy pathmilestone-publish.yml
File metadata and controls
70 lines (63 loc) · 2.56 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# 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: Release new version
on:
milestone:
types: [closed]
jobs:
publish:
environment:
name: production
deployment: false
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v7
with:
node-version: 26
registry-url: https://registry.npmjs.org/
package-manager-cache: false # never use caching in release builds
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: 3.14
- name: Set git user
run: |
git config --global user.email "github-action@users.noreply.github.com"
git config --global user.name "GitHub Action"
- name: Fetch beautifier/beautifier.io
env:
BEAUTIFIER_IO_DEPLOY_KEY: ${{ secrets.BEAUTIFIER_IO_DEPLOY_KEY }}
JS_BEAUTIFY_DEPLOY_KEY: ${{ secrets.JS_BEAUTIFY_DEPLOY_KEY }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
cat .github/workflows/ssh_config.txt > ~/.ssh/config
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-keyscan github.com >> ~/.ssh/known_hosts
cat > ~/.ssh/deploy_beautifier_io <<< "${BEAUTIFIER_IO_DEPLOY_KEY}"
cat > ~/.ssh/deploy_js_beautify <<< "${JS_BEAUTIFY_DEPLOY_KEY}"
chmod 400 ~/.ssh/deploy_beautifier_io
chmod 400 ~/.ssh/deploy_js_beautify
ssh-add ~/.ssh/deploy_beautifier_io
ssh-add ~/.ssh/deploy_js_beautify
git remote add site git@beautifier-github.com:beautifier/beautifier.io.git
git remote add trigger git@js-beautify-github.com:beautifier/js-beautify.git
git fetch --all
- name: Install python twinE
run: pip install twine wheel
- name: Run release script for ${{ github.event.milestone.title }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
MILESTONE_VERSION: ${{ github.event.milestone.title }}
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
run: |
./tools/release-all.sh ${MILESTONE_VERSION}