Skip to content

Commit 99443dc

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

File tree

2 files changed

+93
-0
lines changed

2 files changed

+93
-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

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
ref: GHA-publish
28+
fetch-depth: 0
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 18.x
33+
registry-url: https://npm.pkg.github.com/
34+
scope: '@parsable'
35+
cache: yarn
36+
env:
37+
NODE_AUTH_TOKEN: ${{secrets.GH_PAT_CLASSIC_MACHINE_PARSABLE}}
38+
- name: Install Dependencies
39+
run: yarn install
40+
env:
41+
NODE_AUTH_TOKEN: ${{secrets.GH_PAT_CLASSIC_MACHINE_PARSABLE}}
42+
- name: Git Version
43+
id: version
44+
uses: codacy/git-version@2.8.0
45+
with:
46+
release-branch: GHA-publish
47+
- name: Tag
48+
id: tag
49+
run: |
50+
truncated_version=$(echo ${{ steps.version.outputs.version }} | awk -F- '{print $1}')-test
51+
echo previous tag: ${{ steps.version.outputs.previous-version }} => new tag: ${truncated_version}
52+
# git config --global user.email "ops+machine-parsable@parsable.com"
53+
# git config --global user.name "machine-parsable"
54+
# npm version -m "Updating package.json for version ${truncated_version}" ${truncated_version}
55+
# git pull --ff-only
56+
# git push origin $(git branch --show-current) --tags
57+
# git status
58+
# echo "new_tag=${truncated_version}" >> $GITHUB_OUTPUT
59+
# - name: Release
60+
# env:
61+
# GITHUB_TOKEN: ${{ secrets.GH_PARSABLE_BOT_BYPASS }}
62+
# run: gh release create "${{steps.version.outputs.version}}"
63+
# - name: publishing artifact
64+
# run: npm publish
65+
# env:
66+
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)