@wayward/types 2.14.0-beta.dev.20241018.1 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,70 @@
1
+ on:
2
+ push:
3
+ branches:
4
+ - main
5
+ - master
6
+ - development
7
+
8
+ env:
9
+ REPO_NAME: ${{ github.event.repository.name }}
10
+ EXTRA_RELEASE_ARGS: ${{ github.ref == 'refs/heads/development' && '--prerelease' || '' }}
11
+ EXTRA_NPM_ARGS: ${{ github.ref == 'refs/heads/development' && '--tag dev' || '' }}
12
+
13
+ jobs:
14
+ release:
15
+ name: Release
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: write
19
+ id-token: write
20
+ packages: write
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - uses: actions/setup-node@v4
25
+ with:
26
+ node-version: "20.x"
27
+ registry-url: "https://registry.npmjs.org"
28
+
29
+ - name: Parse package.json
30
+ id: set_var
31
+ run: |
32
+ content=`cat ./package.json`
33
+ content="${content//'%'/'%25'}"
34
+ content="${content//$'\n'/'%0A'}"
35
+ content="${content//$'\r'/'%0D'}"
36
+ echo "::set-output name=packageJson::$content"
37
+ - run: |
38
+ echo "${{fromJson(steps.set_var.outputs.packageJson).version}}"
39
+ typesversion=${{fromJson(steps.set_var.outputs.packageJson).version}}
40
+ echo "$typesversion"
41
+ echo "TYPES_VERSION=$typesversion" >> $GITHUB_ENV
42
+
43
+ - name: zip
44
+ run: |
45
+ cd ../
46
+ zip -r $REPO_NAME.zip $REPO_NAME -x "$REPO_NAME/.git/*" "$REPO_NAME/.github/*" "$REPO_NAME/node_modules/*"
47
+
48
+ - name: Delete release
49
+ env:
50
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51
+ continue-on-error: true
52
+ run: |
53
+ gh release delete "v$TYPES_VERSION" --cleanup-tag --yes
54
+
55
+ - name: Create release
56
+ env:
57
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58
+ tag: ${{ github.ref_name }}
59
+ run: |
60
+ gh release create "v$TYPES_VERSION" \
61
+ --repo="$GITHUB_REPOSITORY" \
62
+ --target="${{ github.sha }}" \
63
+ --title="v$TYPES_VERSION" \
64
+ --generate-notes \
65
+ $EXTRA_RELEASE_ARGS \
66
+ "../$REPO_NAME.zip#$REPO_NAME.zip"
67
+
68
+ - run: npm publish --provenance --access public $EXTRA_NPM_ARGS
69
+ env:
70
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.14.0-beta.dev.20241018.1",
4
+ "version": "2.14.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,4 +17,4 @@
17
17
  "devDependencies": {
18
18
  "@wayward/game": "^1.0.0"
19
19
  }
20
- }
20
+ }