Skip to content

Commit

Permalink
Publish as Linux package
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonRolev committed Oct 7, 2024
1 parent 2eabff8 commit edeab43
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/actions/release-os/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.NPM_PKG_KEY }}
NODE_AUTH_TOKEN: ${{secrets.NPM_PKG_KEY}}
working-directory: libMvrGdtf
run: |
git checkout -b release/linux
node scripts/json-updater.js --name @mvrdevelopment/lib-gdtf-linux --os "linux" --files "package.json"
npm version patch --no-git-tag-version
git add .
git commit -m "Package prepare"
npm install
npm publish --dry-run
23 changes: 19 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,36 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Build
uses: ./libMvrGdtf/.github/actions/build-linux
# - name: Build
# uses: ./libMvrGdtf/.github/actions/build-linux

- name: Add .npmrc
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PKG_KEY}}
run: |
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
echo "@mvrdevelopment:registry=https://npm.pkg.github.com/" >> ~/.npmrc
- name: Mock github user
run: |
git config --global user.email "[email protected]"
git config --global user.name "Simeon Rolev"
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.NPM_PKG_KEY }}
NODE_AUTH_TOKEN: ${{secrets.NPM_PKG_KEY}}
working-directory: libMvrGdtf
working-directory: libMvrGdtf
run: |
git checkout -b release/linux
node scripts/json-updater.js --name @mvrdevelopment/lib-gdtf-linux --os "linux" --files "package.json"
npm version patch --no-git-tag-version
git add .
git commit -m "Package prepare"
npm install
npm run release
npm publish --dry-run
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
},
"private": false,
"scripts": {
"release": "auto shipit --base-branch=master"
"release": "auto shipit --base-branch=master",
"auto-latest": "auto latest --dry-run"
},
"devDependencies": {
"auto": "^11.2.1"
Expand Down

0 comments on commit edeab43

Please sign in to comment.