Skip to content

Commit c0748b3

Browse files
GHA-publish: testing out 0.1
1 parent 4c5ac0d commit c0748b3

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

.github/dependabot.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "sunday"
8+
time: "09:00"
9+
timezone: "America/Los_Angeles"
10+
ignore:
11+
- dependency-name: "*"
12+
update-types: [version-update:semver-major]
13+
open-pull-requests-limit: 5
14+
commit-message:
15+
prefix: "bot: update npm dependencies: "
16+
17+
- package-ecosystem: "github-actions"
18+
directory: "/"
19+
schedule:
20+
interval: "weekly"
21+
day: "sunday"
22+
time: "09:00"
23+
timezone: "America/Los_Angeles"
24+
open-pull-requests-limit: 10
25+
commit-message:
26+
prefix: "[no-jira] bot: update github-actions image to "
27+

.github/workflows/build-publish.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: build-publish
2+
permissions:
3+
contents: write
4+
id-token: write
5+
packages: write
6+
7+
on:
8+
push:
9+
branches:
10+
- GHA-publish
11+
# pull_request_target:
12+
# types:
13+
# - closed
14+
# branches:
15+
# - main
16+
17+
jobs:
18+
build-publish:
19+
name: build publish artifact
20+
runs-on: ubuntu-latest
21+
# if: github.event.pull_request.merged == true
22+
timeout-minutes: 20
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
token: ${{ secrets.GH_PARSABLE_BOT_BYPASS }}
28+
ref: GHA-publish
29+
fetch-depth: 0
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 18.x
34+
registry-url: https://npm.pkg.github.com/
35+
scope: '@parsable'
36+
cache: yarn
37+
env:
38+
NODE_AUTH_TOKEN: ${{secrets.GH_PAT_CLASSIC_MACHINE_PARSABLE}}
39+
- name: Install Dependencies
40+
run: yarn install
41+
env:
42+
NODE_AUTH_TOKEN: ${{secrets.GH_PAT_CLASSIC_MACHINE_PARSABLE}}
43+
- name: Git Version
44+
id: version
45+
uses: codacy/git-version@2.8.0
46+
with:
47+
release-branch: GHA-publish
48+
- name: Tag
49+
id: tag
50+
run: |
51+
truncated_version=$(echo ${{ steps.version.outputs.version }} | awk -F- '{print $1}')-test
52+
echo previous tag: ${{ steps.version.outputs.previous-version }} => new tag: ${truncated_version}
53+
# git config --global user.email "ops+machine-parsable@parsable.com"
54+
# git config --global user.name "machine-parsable"
55+
# npm version -m "Updating package.json for version ${truncated_version}" ${truncated_version}
56+
# git pull --ff-only
57+
# git push origin $(git branch --show-current) --tags
58+
# git status
59+
# echo "new_tag=${truncated_version}" >> $GITHUB_OUTPUT
60+
# - name: Release
61+
# env:
62+
# GITHUB_TOKEN: ${{ secrets.GH_PARSABLE_BOT_BYPASS }}
63+
# run: gh release create "${{steps.version.outputs.version}}"
64+
# - name: publishing artifact
65+
# run: npm publish
66+
# env:
67+
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)