Skip to content

Commit

Permalink
Change CI to publish to GitHub package registry
Browse files Browse the repository at this point in the history
On pushes to the experience-cs branch.
  • Loading branch information
floehopper committed Jan 16, 2025
1 parent b8db7da commit a114a70
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI/CD
on:
pull_request: # Runs whenever a pull request is created or updated (including from another fork)
push: # Runs whenever a commit is pushed to the repository...
branches: [master, develop, hotfix/*] # ...on any of these branches
branches: [experience-cs] # ...on any of these branches
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
concurrency:
group: "${{ github.workflow }} @ ${{ github.head_ref || github.ref }}"
Expand Down Expand Up @@ -79,11 +79,14 @@ jobs:
if [[ ${{contains(github.ref, 'hotfix')}} ]]; then
sed -e "s|hotfix/REPLACE|${{ github.ref_name }}|" --in-place release.config.js
fi
- name: Semantic Release
- name: Publish to GitHub Packages
if: github.ref == 'refs/heads/experience-cs'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx --no -- semantic-release
RELEASE_VERSION: 0.1.0-raspberrypifoundation.20250116171224
run: |
npm version --no-git-tag-version $RELEASE_VERSION
npm set //npm.pkg.github.com/:_authToken=$GITHUB_TOKEN
npm publish --access public --tag latest
- name: Deploy playground to GitHub Pages
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"name": "scratch-gui",
"name": "@freerange/scratch-gui",
"version": "5.1.29",
"description": "Graphical User Interface for creating and running Scratch 3.0 projects",
"author": "Massachusetts Institute of Technology",
"license": "AGPL-3.0-only",
"homepage": "https://github.com/scratchfoundation/scratch-gui#readme",
"homepage": "https://github.com/freerange/scratch-gui#readme",
"repository": {
"type": "git",
"url": "https://github.com/scratchfoundation/scratch-gui.git"
"url": "https://github.com/freerange/scratch-gui.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"main": "./dist/scratch-gui.js",
"scripts": {
Expand Down

0 comments on commit a114a70

Please sign in to comment.