diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..5a8957227 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Release curriculum + +on: + pull_request: + branches: + - main + +jobs: + build_dist: + name: Build dist files + if: ${{ github.head_ref == 'next' || github.head_ref == 'release_workflow_test'}} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: '16' + - run: npm ci + version_tag_release: + - name: Version and tag release + id: version_tag_release # npm version will tag release automatically git-tag-release + steps: + - name: Parse changelog + id: get_changelog + run: npm run changelog + outputs: + changelog: ${{ steps.get_changelog.outputs }} + env: + isMajor: ${{ steps.get_changelog.outputs.contains('!:')}} + isMinor: ${{ steps.get_changelog.outputs.contains('feat') && !env.isMajor }} + - name: Increment version + id: bump_version + run: npm version ${{ (env.isMajor && 'major') || (env.isMinor && 'minor') || 'patch' }} -m 'chore(release): Bumps version to v%s and updates dist files' + outputs: + new_tag: ${{ steps.bump_version.outputs }} + create_release: + - name: Create release + id: create_release + steps: + - name: Make notes + id: make_notes + uses: mikepenz/release-changelog-builder-action@{latest-release} + - name: Make release draft + id: release_draft + run: echo "Creating release draft" + # run: | + # gh release create ${{jobs.version_tag_release.outputs.new_tag}} \ + # --repo="$GITHUB_REPOSITORY" \ + # --title="${GITHUB_REPOSITORY#*/} ${{jobs.version_tag_release.outputs.new_tag}}" \ + # --notes ${{steps.make_notes.outputs.changelog}} \ + # --draft diff --git a/package-lock.json b/package-lock.json index c84714af4..fd5d6b7f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "curriculum", - "version": "7.7.0", + "version": "8.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "curriculum", - "version": "7.7.0", + "version": "8.2.1", "license": "CC-BY-SA-4.0", "dependencies": { "@emotion/react": "^11.11.3", @@ -25,7 +25,7 @@ "react-dom": "^17.0.2", "react-intl": "^6.5.5", "react-router-dom": "^6.20.1", - "vite": "^5.0.11", + "vite": "^5.0.12", "web-vitals": "^3.5.1" }, "devDependencies": { @@ -13597,9 +13597,9 @@ } }, "node_modules/vite": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.11.tgz", - "integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", + "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.32", diff --git a/package.json b/package.json index b80621841..47a27e7ac 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,10 @@ "preview": "vite preview", "test": "vitest run ./src/components/**/*.spec.jsx", "link-parser": "rm -rf node_modules/@laboratoria/curriculum-parser && ln -s ../../../curriculum-parser node_modules/@laboratoria/", - "link-react": "rm -rf node_modules/@laboratoria/react && ln -s ../../../react node_modules/@laboratoria/" + "link-react": "rm -rf node_modules/@laboratoria/react && ln -s ../../../react node_modules/@laboratoria/", + "preversion": "npm test", + "version": "rm -rf dist && npm run build:content && git add -A dist", + "postversion": "echo 'post versioning should do git push and git push --tags'" }, "dependencies": { "@emotion/react": "^11.11.3", @@ -51,7 +54,7 @@ "react-dom": "^17.0.2", "react-intl": "^6.5.5", "react-router-dom": "^6.20.1", - "vite": "^5.0.11", + "vite": "^5.0.12", "web-vitals": "^3.5.1" }, "devDependencies": { diff --git a/projects/02-dataverse/README.pt.md b/projects/02-dataverse/README.pt.md index aacce6691..7c43baaac 100644 --- a/projects/02-dataverse/README.pt.md +++ b/projects/02-dataverse/README.pt.md @@ -138,7 +138,7 @@ implementadas: * A aplicação deve permitir à usuária filtrar os dados. Você usará um elemento [`` terá `name="tipo"`). Os ``). - Uma alternativa é oferecer à usuária uma ordenação mais complexa. Pode implementar a ordenação por várias propriedades. Neste caso, seria com - um `` com um atributo de dados `data-testid="select-sort"`, e que contenha filhos ``). Além disso, você precisará de outro controle (``,`