-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.25 KB
/
ci.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
name: GitHub Actions OIDC Test
on:
push:
branches:
- main
permissions:
id-token: write # required to use OIDC authentication
contents: write # required to checkout the code from the repo
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- uses: oven-sh/setup-bun@v1
- uses: actions/setup-node@v3
with:
node-version: 18
# Install Dependencies
- run: bun install --frozen-lockfile
- name: Git Identity
run: |
git config --global user.name 'CI-CD'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Bump Versions (reinstate after release)
- name: Bump versions
run: bun version:ci
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure npm authentication
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_ACCESS_TOKEN }}
# Create Release
- name: Publish
run: bun run publish:ci