-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/eufelipemateus/domino-game
Showing
4 changed files
with
85 additions
and
4,791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,63 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Node.js Package | ||
|
||
name: release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
release: | ||
types: [published] | ||
|
||
release: | ||
types: [created] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- run: npm ci | ||
- run: npm test | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the exact commit tagged on the release. | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.release.target_commitish }} | ||
|
||
# This is the action in this repo! 👇 | ||
# Note we set an `id` called `release`. We'll use that later... | ||
- name: Validate and extract release information | ||
id: release | ||
uses: manovotny/github-releases-for-automated-package-publishing-action@v1.0.0 | ||
|
||
# When setting the node version for publishing a release, it's also impotant | ||
# to set `always-auth` and `registry-url` too. I've encountered vauge errors | ||
# and publishing doesn't work unless they are supplied. | ||
# | ||
# This example is using NPM's registry. If you were publishing to GitHub's | ||
# Package registry, you'd use `https://npm.pkg.github.com` instead. | ||
- name: Set node version | ||
uses: actions/setup-node@v2 | ||
with: | ||
always-auth: true | ||
node-version: '12.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
|
||
# Perform installs, run tests, run a build step, etc. here, as needed. | ||
|
||
# The last two steps will publish the package. Note that we're using | ||
# information from the `release` step above (I told you we'd use it | ||
# later). Notice the `if` statements on both steps... | ||
# | ||
# If there *is* a tag (ie. `beta`, `canary`, etc.), we publish a | ||
# "pre-release" or "tagged" version of a package (ie. 1.2.3-beta.1). | ||
# | ||
# If there *is not* a tag (ie. `beta`, `canary`, etc.), we publish a | ||
# version of a package (ie. 1.2.3). | ||
# | ||
# This example is using yarn to publish, but you could just as easily | ||
# use npm, if you prefer. It's also publishing to the NPM registry, | ||
# thus, it's using `NPM_TOKEN`, but you could just as easily use | ||
# `GITHUB_TOKEN` if you were publishing to the GitHub Package registry. | ||
|
||
# This will publish a "pre-release" or "tagged" version of a package. | ||
- name: Publish tagged version | ||
if: steps.release.outputs.tag != '' | ||
run: yarn publish --new-version ${{ steps.release.outputs.version }} --tag ${{ steps.release.outputs.tag }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-gpr: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
registry-url: https://npm.pkg.github.com/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
# This will publish a version of a package. | ||
- name: Publish version | ||
if: steps.release.outputs.tag == '' | ||
run: yarn publish --new-version ${{ steps.release.outputs.version }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters