-
Notifications
You must be signed in to change notification settings - Fork 169
60 lines (60 loc) · 2.05 KB
/
Copy pathpublish-release.yml
File metadata and controls
60 lines (60 loc) · 2.05 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
name: Generate new release
on:
push:
tags:
- 'v3*'
jobs:
build:
runs-on: ubuntu-latest
container:
image: timbru31/ruby-node:3.3-22
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 3.x
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: apt-get update && apt-get install zip
- run: bundle install
- run: chmod -R 777 .
- run: mv .npmrc-dist .npmrc
- run: npm ci
- run: npm run build
- name: Publish package to NPM
run: npm publish --tag alpha # to change
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm i extract-changelog-release
- name: Generate Release Body
run: npx extract-changelog-release > RELEASE_BODY.md
- run: sh ./scripts/create-release-attachment.sh
- uses: ncipollo/release-action@v1
with:
artifacts: './dist/zip/*.zip'
bodyFile: 'RELEASE_BODY.md'
token: ${{ secrets.GITHUB_TOKEN }}
makeLatest: false # to change
# - name: Publish on gh-pages
# run: |
# git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
# chown -R 1001:121 "/github/home/.npm"
# chown -R 1001:121 "/github/home/.bundle/"
# chmod -R 777 /github/home/.bundle/
# chmod -R 777 /usr/local/bundle/
# npm run documentation-deploy-to-gh-pages
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: italia/slack-notify-release-action@v0.2.0
# with:
# slack_token: ${{ secrets.SLACK_TOKEN }}
# channel_id: ${{ secrets.SLACK_CHANNEL }}
# project_name: Bootstrap Italia