diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..07b9f2f --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,47 @@ +# This is a basic workflow to help you get started with Actions + +name: Deploy APG-JS + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + tags: + - 'v*.*.*' + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Get Tag name + id: get-version + run: echo ::set-output name=version::${GITHUB_REF#refs/*/} + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 16 + registry-url: https://npm.pkg.github.com/ + + - name: Github private package token in npmrc + run: | + echo "@axieinfinity:registry=https://npm.pkg.github.com/" >> .npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.AXIE_SCOPE_TOKEN }}" >> .npmrc + + # Runs a set of commands using the runners shell + - name: Build + run: | + yarn + yarn build + yarn publish + + env: + NODE_AUTH_TOKEN: ${{ secrets.AXIE_SCOPE_TOKEN }} + + diff --git a/.gitignore b/.gitignore index ba28a0c..c461e21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.* !.gitignore !.eslintrc.json !.prettierrc