diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..31d856c08 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# Automatically generated CODEOWNERS +# Regenerate with `make update-codeowners` +draft-ietf-tls-rfc8446bis.md ekr@rtfm.com diff --git a/.github/workflows/archive.yml b/.github/workflows/archive.yml index 6aa2c09a8..5f5d47df2 100644 --- a/.github/workflows/archive.yml +++ b/.github/workflows/archive.yml @@ -5,30 +5,40 @@ on: - cron: '0 0 * * 0,2,4' repository_dispatch: types: [archive] + workflow_dispatch: + inputs: + archive_full: + description: 'Recreate the archive from scratch' + default: false + type: boolean jobs: build: name: "Archive Issues and Pull Requests" runs-on: ubuntu-latest + permissions: + contents: write steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + # Note: No caching for this build! - name: "Update Archive" uses: martinthomson/i-d-template@v1 + env: + ARCHIVE_FULL: ${{ inputs.archive_full }} with: make: archive - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + token: ${{ github.token }} - name: "Update GitHub Pages" uses: martinthomson/i-d-template@v1 with: make: gh-archive - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + token: ${{ github.token }} - name: "Save Archive" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: archive.json diff --git a/.github/workflows/ghpages.yml b/.github/workflows/ghpages.yml index 342f9d614..f6cb64db3 100644 --- a/.github/workflows/ghpages.yml +++ b/.github/workflows/ghpages.yml @@ -18,43 +18,43 @@ jobs: build: name: "Update Editor's Copy" runs-on: ubuntu-latest + permissions: + contents: write steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: "Cache Setup" - id: cache-setup - run: | - mkdir -p "$HOME"/.cache/xml2rfc - echo "::set-output name=path::$HOME/.cache/xml2rfc" - date -u "+::set-output name=date::%FT%T" + - name: "Setup" + id: setup + run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" - - name: "Cache References" - uses: actions/cache@v2 + - name: "Caching" + uses: actions/cache@v4 with: - path: ${{ steps.cache-setup.outputs.path }} - key: refcache-${{ steps.cache-setup.outputs.date }} - restore-keys: | - refcache-${{ steps.cache-setup.outputs.date }} - refcache- + path: | + .refcache + .venv + .gems + node_modules + .targets.mk + key: i-d-${{ steps.setup.outputs.date }} + restore-keys: i-d- - name: "Build Drafts" uses: martinthomson/i-d-template@v1 + with: + token: ${{ github.token }} - name: "Update GitHub Pages" uses: martinthomson/i-d-template@v1 if: ${{ github.event_name == 'push' }} with: make: gh-pages - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Save HTML" - uses: actions/upload-artifact@v2 - with: - path: "*.html" + token: ${{ github.token }} - - name: "Save Text" - uses: actions/upload-artifact@v2 + - name: "Archive Built Drafts" + uses: actions/upload-artifact@v4 with: - path: "*.txt" + path: | + draft-*.html + draft-*.txt diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 07e2105f3..94d885f3f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,12 @@ on: push: tags: - "draft-*" + workflow_dispatch: + inputs: + email: + description: "Submitter email" + default: "" + type: string jobs: build: @@ -11,29 +17,41 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 # See https://github.com/actions/checkout/issues/290 - name: "Get Tag Annotations" run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} - - name: "Cache Setup" - id: cache-setup - run: | - mkdir -p "$HOME"/.cache/xml2rfc - echo "::set-output name=path::$HOME/.cache/xml2rfc" - date -u "+::set-output name=date::%FT%T" + - name: "Setup" + id: setup + run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" - - name: "Cache References" - uses: actions/cache@v2 + - name: "Caching" + uses: actions/cache@v4 with: - path: ${{ steps.cache-setup.outputs.path }} - key: refcache-${{ steps.date.outputs.date }} - restore-keys: | - refcache-${{ steps.date.outputs.date }} - refcache- + path: | + .refcache + .venv + .gems + node_modules + .targets.mk + key: i-d-${{ steps.setup.outputs.date }} + restore-keys: i-d- + + - name: "Build Drafts" + uses: martinthomson/i-d-template@v1 + with: + token: ${{ github.token }} - name: "Upload to Datatracker" uses: martinthomson/i-d-template@v1 with: make: upload + env: + UPLOAD_EMAIL: ${{ inputs.email }} + + - name: "Archive Submitted Drafts" + uses: actions/upload-artifact@v4 + with: + path: "versioned/draft-*-[0-9][0-9].*" diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 000000000..0f8d6b8f7 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,36 @@ +name: "Update Generated Files" +# This rule is not run automatically. +# It can be run manually to update all of the files that are part +# of the template, specifically: +# - README.md +# - CONTRIBUTING.md +# - .note.xml +# - .github/CODEOWNERS +# - Makefile +# +# +# This might be useful if you have: +# - added, removed, or renamed drafts (including after adoption) +# - added, removed, or changed draft editors +# - changed the title of drafts +# +# Note that this removes any customizations you have made to +# the affected files. +on: workflow_dispatch + +jobs: + build: + name: "Update Files" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Update Generated Files" + uses: martinthomson/i-d-template@v1 + with: + make: update-files + token: ${{ github.token }} + + - name: "Push Update" + run: git push diff --git a/.gitignore b/.gitignore index 231164aef..832310de2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,23 @@ +*.html +*.pdf +*.redxml +*.swp +*.txt +*.upload *~ -.refcache -.targets.mk +.tags +/*-[0-9][0-9].xml +/.*.mk +/.gems/ +/.refcache +/.venv/ +/.vscode/ +/lib /node_modules/ -/package-lock.json -diff-*.html -draft-*.html -draft-*.txt -draft-*.xml -lib +/versioned/ +Gemfile.lock +archive.json +draft-ietf-tls-rfc8446bis.xml +package-lock.json +report.xml +!requirements.txt diff --git a/Makefile b/Makefile index 25e7170ca..22702047d 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,18 @@ MD_PREPROCESSOR := python3 mk-appendix.py XML_RESOURCE_ORG_PREFIX = https://xml2rfc.tools.ietf.org/public/rfc -include lib/main.mk +LIBDIR := lib +include $(LIBDIR)/main.mk -lib/main.mk: -ifneq (,$(shell git submodule status lib 2>/dev/null)) +$(LIBDIR)/main.mk: +ifneq (,$(shell grep "path *= *$(LIBDIR)" .gitmodules 2>/dev/null)) git submodule sync git submodule update --init else - git clone --depth 10 -b main https://github.com/martinthomson/i-d-template.git lib +ifneq (,$(wildcard $(ID_TEMPLATE_HOME))) + ln -s "$(ID_TEMPLATE_HOME)" $(LIBDIR) +else + git clone -q --depth 10 -b main \ + https://github.com/martinthomson/i-d-template $(LIBDIR) +endif endif