Skip to content

Code for IBM i 2.6.3 #259

Code for IBM i 2.6.3

Code for IBM i 2.6.3 #259

Workflow file for this run

on:
release:
types: [created]
jobs:
release:
name: Release and publish
runs-on: ubuntu-latest
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@v3
with:
ref: master
- name: Install dependencies
run: npm install
- name: Update version number
run: |
npm version --allow-same-version --no-git-tag-version ${{ github.ref_name }}
cd types && npm version --allow-same-version --no-git-tag-version ${{ github.ref_name }}
- name: Package
run: npx @vscode/vsce package
- name: Publish
run: |
npx @vscode/vsce publish --skip-duplicate --packagePath code-for-ibmi-${{ github.ref_name }}.vsix --pat ${{ secrets.PUBLISHER_TOKEN }}
npx ovsx publish --skip-duplicate --packagePath code-for-ibmi-${{ github.ref_name }}.vsix --pat ${{ secrets.OPENVSX_TOKEN }}
- name: Attach vsix
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
asset_name: code-for-ibmi-${{ github.ref_name }}.vsix
file: code-for-ibmi-${{ github.ref_name }}.vsix
- name: Generate typings
run: npm run typings
- name: Cleanup typings
run: cd types && npm run prepublish
- name: Publish typings to npm
run: cd types && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit changes and move release tag
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit --allow-empty -a -m "Release ${{ github.ref_name }}"
git tag -f ${{ github.ref_name }}
git push --tags --force
- name: Bump version numbers for next cycle
run: |
npm version --no-git-tag-version prerelease --preid dev
cd types && npm version --no-git-tag-version prerelease --preid dev
- name: Read new version
id: new-version
uses: beaconbrigade/[email protected]
- name: Commit version number change
run: |
git commit -a -m "Starting ${{ steps.new-version.outputs.version }} development"
git push