-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.56 KB
/
release.yml
File metadata and controls
59 lines (48 loc) · 1.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
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm install --include=dev
- name: Run tests
run: npm run test
- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ vars.SCN_GIT_EMAIL }}
GIT_AUTHOR_NAME: ${{ vars.SCN_GIT_NAME }}
GIT_COMMITTER_EMAIL: ${{ vars.SCN_GIT_EMAIL }}
GIT_COMMITTER_NAME: ${{ vars.SCN_GIT_NAME }}
REPO_OWNER: "Local-Connectivity-Lab"
REPO_NAME: "ccn-coverage-docker"
TARGET_ARTIFACT_NAME: "ccn-coverage-api"
run: npx semantic-release
- name: Get version
id: get_version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Released version: $VERSION"
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: icr.infra.seattlecommunitynetwork.org
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and publish Docker image
run: |
make publish VERSION=${{ steps.get_version.outputs.VERSION }}