Debian Codegraph @

.github/workflows/milestone-publish.yml

raw symbols SCIP
1 # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3
4 name: Release new version
5
6 on:
7 milestone:
8 types: [closed]
9
10
11 jobs:
12 publish:
13 runs-on: ubuntu-latest
14 steps:
15 - uses: actions/checkout@v4
16 with:
17 fetch-depth: 0
18 - name: Set up Node
19 uses: actions/setup-node@v4
20 with:
21 node-version: 18
22 registry-url: https://registry.npmjs.org/
23 - name: Set up Python
24 uses: actions/setup-python@v5
25 with:
26 python-version: 3.11
27 - name: Set git user
28 run: |
29 git config --global user.email "[email protected]"
30 git config --global user.name "GitHub Action"
31 - name: Fetch beautifier/beautifier.io
32 env:
33 BEAUTIFIER_IO_DEPLOY_KEY: ${{ secrets.BEAUTIFIER_IO_DEPLOY_KEY }}
34 JS_BEAUTIFY_DEPLOY_KEY: ${{ secrets.JS_BEAUTIFY_DEPLOY_KEY }}
35 SSH_AUTH_SOCK: /tmp/ssh_agent.sock
36 run: |
37 mkdir -p ~/.ssh
38 cat .github/workflows/ssh_config.txt > ~/.ssh/config
39 ssh-agent -a $SSH_AUTH_SOCK > /dev/null
40 ssh-keyscan github.com >> ~/.ssh/known_hosts
41
42 cat > ~/.ssh/deploy_beautifier_io <<< "${BEAUTIFIER_IO_DEPLOY_KEY}"
43 cat > ~/.ssh/deploy_js_beautify <<< "${JS_BEAUTIFY_DEPLOY_KEY}"
44
45 chmod 400 ~/.ssh/deploy_beautifier_io
46 chmod 400 ~/.ssh/deploy_js_beautify
47
48 ssh-add ~/.ssh/deploy_beautifier_io
49 ssh-add ~/.ssh/deploy_js_beautify
50
51 git remote add site [email protected]:beautifier/beautifier.io.git
52 git remote add trigger [email protected]:beautifier/js-beautify.git
53 git fetch --all
54 - name: Install python twinE
55 run: pip install twine wheel
56 - name: Run release script for ${{ github.event.milestone.title }}
57 env:
58 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 SSH_AUTH_SOCK: /tmp/ssh_agent.sock
60 MILESTONE_VERSION: ${{ github.event.milestone.title }}
61 NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
62 TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
63 TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
64 run: |
65 ./tools/release-all.sh ${MILESTONE_VERSION}